git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@911
f203690c-595d-4dc9-a70b-
905162fa7fd2
{
if(value == null) {
return BigDecimal.ZERO;
- } if(value instanceof Number) {
+ } else if(value instanceof Number) {
return (Number)value;
}
return Double.valueOf(value.toString());
* @usage _advanced_method_
*/
public static boolean toBooleanValue(Object obj) {
- return ((obj != null) && ((Boolean)obj).booleanValue());
+ if(obj == null) {
+ return false;
+ } else if(obj instanceof Boolean) {
+ return ((Boolean)obj).booleanValue();
+ }
+ return Boolean.parseBoolean(obj.toString());
}
/**