rust-maven-plugin
rust-maven-plugin copied to clipboard
bug: Empty property in environment variable causes nullptr exception
An environment variable value can be specified as so in pom.xml:
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<properties>
<rustflags>-D warnings</rustflags>
</properties>
...
<plugins>
<plugin>
<groupId>org.questdb</groupId>
<artifactId>rust-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
...
<configuration>
...
<environmentVariables>
<RUSTFLAGS>${rustflags}</RUSTFLAGS>
</environmentVariables>
The above works.
If the $rustflags property is instead empty, we end up with a NullPointerException.