aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/impl/PropertyMapImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMapImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMapImpl.java
index 3c14be2..0667ac8 100644
--- a/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMapImpl.java
+++ b/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMapImpl.java
@@ -176,10 +176,11 @@ public class PropertyMapImpl implements PropertyMap
Object value) {
if(type == null) {
- // attempt to figure out the type
- type = DEFAULT_TYPES.get(type);
+ // attempt to get the default type for this property
+ type = DEFAULT_TYPES.get(name);
if(type == null) {
+ // choose the type based on the value
if(value instanceof String) {
type = DataType.TEXT;
} else if(value instanceof Boolean) {