-
Bug
-
Resolution: Done
-
Major
-
JDG 7.0.0 DR1
-
None
Page 206 of the JDG 7 UserGuide, example 18.4, contains this code-snippet:
import org.infinispan.client.hotrod.configuration.ConfigurationBuilder; import org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller; import org.infinispan.protostream.SerializationContext; ... ConfigurationBuilder clientBuilder = new ConfigurationBuilder(); clientBuilder.addServer().host("127.0.0.1").port(11234) .marshaller(new ProtoStreamMarshaller()); RemoteCacheManager remoteCacheManager = new RemoteCacheManager(clientBuilder.build()); SerializationContext serCtx = ProtoStreamMarshaller.getSerializationContext(remoteCacheManager); serCtx.registerProtoFile("/library.proto"); serCtx.registerMarshaller(new BookMarshaller()); serCtx.registerMarshaller(new AuthorMarshaller()); // Book and Author classes omitted for brevity
That code-snippet is incorrect, as the SerializationContext class does not contain a method "registerProtoFile" that accepts a String. The correct method is "serCtx.registerProtoFiles" which accepts a FileDescriptorSource instance.