Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium

New issue 210 by aantono: Broken backwards compatibility of protobuf-java library between 2.0.x and 2.3.x
http://code.google.com/p/protobuf/issues/detail?id=210

What steps will reproduce the problem?
1. Generate java sources from any proto file using protoc 2.0.3
2. Compile the generates source files using protobuf-java lib 2.0.3 and create a model jar 3. Use the compiled model jar in a runtime environment with protobuf-java 2.3.0

What is the expected output? What do you see instead?
It is expected that the runtime would succeed instead of exploding with an exception due to method signature changes in Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(...)


What version of the product are you using? On what operating system?
CentOS 5 with protobuf 2.0.3 and 2.3.0

Please provide any additional information below.

java.lang.NoSuchMethodError: com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom(Ljava/lang/String;[Lcom/google/protobuf/Descriptors$FileDescriptor;Lcom/google/protobuf/Descriptors$FileDescriptor$InternalDescriptorAssigner;)V

The change was made to com.google.protobuf.Descriptors.java in r189
http://code.google.com/p/protobuf/source/diff?spec=svn189&r=189&format=side&path=/trunk/java/src/main/java/com/google/protobuf/Descriptors.java

Suggested fix is to add an old method back as an overload and just pass it to the new signature by wrapping the single String into a String[]{descriptorData} to preserve backwards compatibility with library artifacts that were compiled against 2.0.x previously.

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to