JDK-7067132 : Four java_lang/metadata/Phase2/BinaryCompatibility fail(regression)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 6u26
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2011-07-14
  • Updated: 2014-07-17
  • Resolved: 2011-07-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u26-rev b25Fixed
Related Reports
Relates :  
Description
Following tests failed:

java_lang/metadata/Phase2/BinaryCompatibility/BinaryCompatibilityTest11
java_lang/metadata/Phase2/BinaryCompatibility/BinaryCompatibilityTest6
java_lang/metadata/Phase2/BinaryCompatibility/BinaryCompatibilityTest8 java_lang/metadata/Phase2/BinaryCompatibility/BinaryCompatibilityTest9

with exception:
java.io.InvalidClassException: sun.reflect.annotation.AnnotationInvocationHandler; local class incompatible: stream classdesc serialVersionUID = 6182022883658399397, local class serialVersionUID = 3194649965547556111
	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at BinaryCompatibilityTest6.getSerializedObject(BinaryCompatibilityTest6.java:18)
	at BinaryCompatibilityTest6.assertion1(BinaryCompatibilityTest6.java:10)
	at BinaryCompatibilityTest6.main(BinaryCompatibilityTest6.java:51)

Comments
EVALUATION Test consists of the serialized binary file and a source of the class Test1.java, which was serialized. Problematic code is here: ObjectInputStream in_stream = new ObjectInputStream(new FileInputStream(FilePath)); ann_ref_local = (Test1)in_stream.readObject(); till 6u26-rev-b23 (inclusive) this code restores Test1 instance from the serialized file. 6u26-rev-b24 causes exception. In other words, deserialization is unable to restore a previously serialized class. This is a clear compatibility issue.
19-07-2011