LinguaRobot/aws-cdk-maven-plugin

NPE is thrown if one of the stack parameters is null

RoKish opened this issue · 0 comments

Description

A NullPointerException is thrown if one of the stack parameter values defined in the plugin configuration is null, i.e. if it references a project/system property that is not defined:

Caused by: java.lang.NullPointerException: The value cannot be null
    at java.util.Objects.requireNonNull (Objects.java:247)
    at io.linguarobot.aws.cdk.maven.ParameterValue.value (ParameterValue.java:61)
    at io.linguarobot.aws.cdk.maven.StackDeployer.lambda$deploy$2 (StackDeployer.java:97)
    at java.util.TreeMap.forEach (TreeMap.java:1002)
    at io.linguarobot.aws.cdk.maven.StackDeployer.deploy (StackDeployer.java:97)
    at io.linguarobot.aws.cdk.maven.DeployMojo.execute (DeployMojo.java:75)
    at io.linguarobot.aws.cdk.maven.AbstractCloudActionMojo.execute (AbstractCloudActionMojo.java:16)
    at io.linguarobot.aws.cdk.maven.AbstractCdkMojo.execute (AbstractCdkMojo.java:67)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)

Reproduction Steps

<parameters>
    <Parameter>${some.value}</Parameter>
</parameters>

NullPointerException will be thrown if some.value is not defined.