fixed NPE on empty props

This commit is contained in:
Tony Tam 2015-10-22 15:43:02 -07:00
parent adeff7855c
commit 91afec43a6

View File

@ -131,7 +131,12 @@ public class CodeGenMojo extends AbstractMojo {
if (environmentVariables != null) {
for(String key : environmentVariables.keySet()) {
System.setProperty(key, environmentVariables.get(key));
String value = environmentVariables.get(key);
if(value == null) {
// don't put null values
value = "";
}
System.setProperty(key, value);
}
}