I am surprised to know that getBoolean()
and valueOf()
method returns different results for the same input string.
I have tried to pass the
The API-documentation is your friend.
Boolean.getBoolean probably doesn't do what you think it does:
Returns true if and only if the system property named by the argument exists and is equal to the string "true".
Boolean.valueOf is probably what you're looking for:
The Boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true".