That solves the dynamic dispatch problem. I don't understand why the previous versiondidn't work, but this one does.
1.1 --- a/src/main/java/net/lshift/jackrabbit/BDBPersistenceManager.java Wed Sep 02 19:42:38 2009 +0100
1.2 +++ b/src/main/java/net/lshift/jackrabbit/BDBPersistenceManager.java Wed Sep 02 19:51:08 2009 +0100
1.3 @@ -874,7 +874,7 @@
1.4 public void serialize(Object state, OutputStream stream, BLOBStore bstore)
1.5 throws Exception;
1.6
1.7 - public Object deserialize(Object id, InputStream stream, BLOBStore bstore)
1.8 + public Object deserialize(Object id, FastInputStream stream, BLOBStore bstore)
1.9 throws Exception;
1.10
1.11 }
1.12 @@ -894,7 +894,7 @@
1.13 Serializer.serialize(state, stream);
1.14 }
1.15
1.16 - public Object deserialize(NodeId id, InputStream stream, BLOBStore bstore)
1.17 + public Object deserialize(NodeId id, FastInputStream stream, BLOBStore bstore)
1.18 throws Exception
1.19 {
1.20 NodeState state = newNode(id);
1.21 @@ -908,7 +908,7 @@
1.22 Serializer.serialize(state, stream, bstore);
1.23 }
1.24
1.25 - public Object deserialize(PropertyId id, InputStream stream, BLOBStore bstore)
1.26 + public Object deserialize(PropertyId id, FastInputStream stream, BLOBStore bstore)
1.27 throws Exception
1.28 {
1.29 PropertyState state = newProperty(id);
1.30 @@ -922,7 +922,7 @@
1.31 Serializer.serialize(state, stream);
1.32 }
1.33
1.34 - public Object deserialize(NodeReferencesId id, InputStream stream, BLOBStore bstore)
1.35 + public Object deserialize(NodeReferencesId id, FastInputStream stream, BLOBStore bstore)
1.36 throws Exception
1.37 {
1.38 NodeReferences state = new NodeReferences(id);
1.39 @@ -936,16 +936,6 @@
1.40 out.write(blob.getData(), blob.getOffset(), blob.getLength());
1.41 }
1.42
1.43 - public Object deserialize(BlobId id, InputStream in, BLOBStore bstore)
1.44 - throws Exception
1.45 - {
1.46 - FastOutputStream out = new FastOutputStream();
1.47 - Copy.copy(in, out);
1.48 - return new Blob(id,
1.49 - out.getBufferBytes(),
1.50 - out.getBufferOffset(),
1.51 - out.getBufferLength());
1.52 - }
1.53
1.54 public Object deserialize(BlobId id, FastInputStream in, BLOBStore bstore)
1.55 throws Exception
1.56 @@ -989,7 +979,7 @@
1.57 // Dynamic dispatch will not dispatch a (NodeID,FastInputStream),
1.58 // if public Blob deserialize(BlobId id, FastInputStream in)
1.59 // Is defined above. That would seem to be a bug in dynamic dispatch
1.60 - InputStream stream = new FastInputStream(data.getData());
1.61 + FastInputStream stream = new FastInputStream(data.getData());
1.62 // InputStream stream = new ByteArrayInputStream(data.getData());
1.63 return stateSerializer.deserialize(keyBinding.entryToObject(key), stream, blobStore);
1.64 }