rust-maven-plugin icon indicating copy to clipboard operation
rust-maven-plugin copied to clipboard

bug: Empty property in environment variable causes nullptr exception

Open amunra opened this issue 2 years ago • 0 comments

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.

amunra avatar Jan 22 '24 11:01 amunra