- public static MergeModification fromSerializable(final Object serializable, final SchemaContext schemaContext) {
- PersistentMessages.Modification o = (PersistentMessages.Modification) serializable;
- Decoded decoded = new NormalizedNodeToNodeCodec(schemaContext).decode(o.getPath(), o.getData());
- return new MergeModification(decoded.getDecodedPath(), decoded.getDecodedNode(), schemaContext);
+ public static MergeModification fromStream(ObjectInput in, short version)
+ throws ClassNotFoundException, IOException {
+ MergeModification mod = new MergeModification(version);
+ mod.readExternal(in);
+ return mod;