aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java
index 2b05b83..0565caf 100644
--- a/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java
+++ b/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java
@@ -1418,7 +1418,7 @@ public class ColumnImpl implements Column, Comparable<ColumnImpl> {
{
if(value == null) {
return BigDecimal.ZERO;
- } if(value instanceof Number) {
+ } else if(value instanceof Number) {
return (Number)value;
}
return Double.valueOf(value.toString());
@@ -1501,7 +1501,12 @@ public class ColumnImpl implements Column, Comparable<ColumnImpl> {
* @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());
}
/**