-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
tiger
-
generic, x86
-
generic, windows_2000
-
Verified
A new JVM_ACC_SYNTHETIC bit is now showing up in the public modifier bits
for classes, fields, and methods. In classes which do not define explicit
serialVersionUIDs, this is causing default serialVersionUID values to change.
Although it's not possible to preserve default serialVersionUIDs overall
(since the default serialVersionUID computation algorithm is highly sensitive
to class changes, including some that may result from valid differences
in java compiler implementations), it would make sense to change
ObjectStreamClass's implementation of the serialVersionUID computation to
ignore the JVM_ACC_SYNTHETIC modifier, so as to minimize the impact of this
change.
This change may not necessarily require a spec update, since the serialization
spec does not strictly specify how the class, field, constructor, and method
modifier values written out during serialVersionUID computation are obtained,
or whether all flags in the modifier bit-vector are considered--the current
implementation of the serialVersionUID computation algorithm masks out all
flags except those representing the public, final, interface, and abstract
modifiers for classes, but does not perform the same masking for field,
constructor, and method modifiers.
for classes, fields, and methods. In classes which do not define explicit
serialVersionUIDs, this is causing default serialVersionUID values to change.
Although it's not possible to preserve default serialVersionUIDs overall
(since the default serialVersionUID computation algorithm is highly sensitive
to class changes, including some that may result from valid differences
in java compiler implementations), it would make sense to change
ObjectStreamClass's implementation of the serialVersionUID computation to
ignore the JVM_ACC_SYNTHETIC modifier, so as to minimize the impact of this
change.
This change may not necessarily require a spec update, since the serialization
spec does not strictly specify how the class, field, constructor, and method
modifier values written out during serialVersionUID computation are obtained,
or whether all flags in the modifier bit-vector are considered--the current
implementation of the serialVersionUID computation algorithm masks out all
flags except those representing the public, final, interface, and abstract
modifiers for classes, but does not perform the same masking for field,
constructor, and method modifiers.
- duplicates
-
JDK-4906639 REGRESSION: JCK1.5-runtime api/java_awt/Color/ICC_ColorSpace/serial/index.html#C
- Closed
- relates to
-
JDK-4916421 REGRESSION: JCK1.5-runtime api/java_awt/Color/ICC_ColorSpace/..Constructor fails
- Closed
-
JDK-4916419 REGRESSION: JCK1.5-runtime api/java_awt/Color/ICC_ColorSpace/..Constructor fails
- Closed
-
JDK-8007079 Changes in default serialVersionUID calculation since JDK8-b73
- Closed
-
JDK-4972569 REGRESSION:java.awt.Component.AccessibleAWTComponent changed its serialVersionUI
- Closed