I noticed an issue with java.lang.Boolean class that it can not parse nulls. I know it has the parseBoolean static method but as it's signature states it only accepts String and not an Object.
In other words, it has the following signature:
public static boolean parseBoolean(String s)
but not:
Boolean.parseBoolean(Object)
What is the best way to check a Boolean value without falling on NullPointerException?
Boolean(that is either true, false, or null) into aboolean? If so, you'll have to decide whether you want nulls to be true or false.parseBoolean(null)is only applicable forparseBoolean(Object)? If not, how do you want your Objects to be parsed toBoolean?Boolean.TRUE