HCOLL-283 HCOLL-276 Fixed a bug in with underinitialized key/value serialization builders when the server map is deserialized from file

This commit is contained in:
leventov
2014-12-31 02:01:25 +07:00
parent 0a464731f6
commit 52b8ad86d5
5 changed files with 17 additions and 11 deletions
@@ -1332,6 +1332,11 @@ public final class ChronicleMapBuilder<K, V> implements Cloneable,
(VanillaChronicleMap<K, ?, ?, V, ?, ?>) xStream.fromXML(ois);
map.headerSize = roundUpMapHeaderSize(fis.getChannel().position());
map.createMappedStoreAndSegments(file);
// This is needed to property initialize key and value serialization builders,
// which are later used in replication
// TODO don't use SerializationBuilders in replication, extract marshallers
// needed to transmit to stateless clients directly from map instance
preMapConstruction(singleHashReplication != null || channel != null);
return establishReplication(map, singleHashReplication, channel);
}
}