Browse Source

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
tags/jackcess-2.1.9
James Ahlborn 6 years ago
parent
commit
30cd79721f

+ 3
- 0
src/changes/changes.xml View File

@@ -8,6 +8,9 @@
<action dev="jahlborn" type="fix" system="SourceForge2" issue="141">
Handle more advanced query join constructs.
</action>
<action dev="jahlborn" type="fix" system="SourceForge2" issue="144">
Fix writing of property maps without any properties.
</action>
</release>
<release version="2.1.8" date="2017-06-25">
<action dev="jahlborn" type="fix" system="SourceForge2" issue="142">

+ 7
- 1
src/main/java/com/healthmarketscience/jackcess/impl/PropertyMaps.java View File

@@ -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();

Loading…
Cancel
Save