diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2014-09-09 01:23:27 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2014-09-09 01:23:27 +0000 |
commit | 7d4abaafe28d9dfb61480c9d29b24bbd9a0001e3 (patch) | |
tree | 26630d278e4afafa18e1a0940d4fa786344c2f8b /src/main | |
parent | d608f41a7ac08274eed9adc95ae18674050c8720 (diff) | |
download | jackcess-7d4abaafe28d9dfb61480c9d29b24bbd9a0001e3.tar.gz jackcess-7d4abaafe28d9dfb61480c9d29b24bbd9a0001e3.zip |
add some unit test for property type inference
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@871 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/PropertyMapImpl.java | 5 |
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) { |