diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2017-10-03 01:46:48 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2017-10-03 01:46:48 +0000 |
commit | 30cd79721fc498498f5c2808ccc27ba19c121fe5 (patch) | |
tree | 0bcec223a2bd995e33e1acd831a67eb31d98510d /src/main | |
parent | 9591a1f121edf0fdb686fd24c60c1708c363cd05 (diff) | |
download | jackcess-30cd79721fc498498f5c2808ccc27ba19c121fe5.tar.gz jackcess-30cd79721fc498498f5c2808ccc27ba19c121fe5.zip |
Fix writing of property maps without any properties. fixes #144
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1122 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/PropertyMaps.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMaps.java b/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMaps.java index 01d4dfd..3a63aba 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMaps.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/PropertyMaps.java @@ -213,12 +213,18 @@ public class PropertyMaps implements Iterable<PropertyMapImpl> } } + if(propNames.isEmpty()) { + return null; + } + // write the full set of property names writeBlock(null, propNames, PROPERTY_NAME_LIST, bab); // write all the map values for(PropertyMapImpl propMap : maps) { - writeBlock(propMap, propNames, propMap.getType(), bab); + if(!propMap.isEmpty()) { + writeBlock(propMap, propNames, propMap.getType(), bab); + } } return bab.toArray(); |