Kallin Nagelberg | 16 Jul 22:03

[groovy-user] System.getproperty returns string 'false' instead of null.

I just discovered that calling System.getProperty(key) with a key that didn't exist is returning a String of value "false" instead of null.

This confuses my program as I do checks on the result like

if (result){
// do something
}

it actually does something, because "false" is not the same as empty string or null in groovy.

Has anyone experienced this?

Gmane