<author email="javajedi@users.sf.net">Tim McCune</author>
</properties>
<body>
+ <release version="1.2.14.2" date="TBD">
+ <action dev="jahlborn" type="fix" system="SourceForge2" issue="96">
+ Fix reading of Properties with multiple value blocks.
+ </action>
+ </release>
<release version="1.2.14.1" date="2013-08-11">
<action dev="jahlborn" type="fix" system="SourceForge2Features"
issue="25">
return _props.values().iterator();
}
+ public PropertyMapImpl merge(PropertyMapImpl opm) {
+ if(opm == null) {
+ return this;
+ }
+
+ // merge into least map type
+ PropertyMapImpl dest = opm;
+ PropertyMapImpl src = this;
+ if(dest._mapType < src._mapType) {
+ dest = this;
+ src = opm;
+ }
+
+ dest._props.putAll(src._props);
+
+ return dest;
+ }
+
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
* Adds the given PropertyMap to this group.
*/
public void put(PropertyMapImpl map) {
- _maps.put(DatabaseImpl.toLookupName(map.getName()), map);
+ String mapName = DatabaseImpl.toLookupName(map.getName());
+ _maps.put(mapName, map.merge(_maps.get(mapName)));
}
public Iterator<PropertyMapImpl> iterator() {
if(type == PROPERTY_NAME_LIST) {
propNames = readPropertyNames(bbBlock);
- } else if((type == DEFAULT_PROPERTY_VALUE_LIST) ||
- (type == COLUMN_PROPERTY_VALUE_LIST)) {
- maps.put(readPropertyValues(bbBlock, propNames, type));
} else {
- throw new IOException("Unknown property block type " + type);
+ maps.put(readPropertyValues(bbBlock, propNames, type));
}
bb.position(endPos);