-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b15
Various JMX classes are serializable, but unlike most serializable classes, they compute a serialVersionUID value instead of defining that value as a constant. The reason for this is for serialization compatibility with JMX 1.0. These classes used certain SVUID values in 1.0 and different values in 1.1 and later; thus, by default, 1.0 was serialization incompatible with 1.1 and later.
There is a switch to change the behavior. If the `jmx.serial.form` system property is set to "1.0" these classes will use the "old" SVUID values corresponding to those used in 1.0; otherwise they will use the "new" SVUID values for 1.1 and later. This enables the JMX running in a given JVM to be compatible with 1.0 or with 1.1-and-later, but not both.
JMX 1.0 is very old at this point -- not sure exactly how old -- and so it seems unnecessary to continue to support this compatibility mode. It should eventually be removed. Initially this likely involves deprecating the `jmx.serial.form` property for removal, issuing release notes, performing community outreach etc.
After a suitable waiting period, the JMX code should be changed to declare serialVersionUID as a constant (`private static final`) using the "new" values, and extraneous fields should be removed. The documentation for the SVUID value can be removed from the javadoc, as the constant SVUID values will be listed automatically on the JDK's Serialized Form page.
SeeJDK-6253903 for a list of the JMX classes affected.
There is a switch to change the behavior. If the `jmx.serial.form` system property is set to "1.0" these classes will use the "old" SVUID values corresponding to those used in 1.0; otherwise they will use the "new" SVUID values for 1.1 and later. This enables the JMX running in a given JVM to be compatible with 1.0 or with 1.1-and-later, but not both.
JMX 1.0 is very old at this point -- not sure exactly how old -- and so it seems unnecessary to continue to support this compatibility mode. It should eventually be removed. Initially this likely involves deprecating the `jmx.serial.form` property for removal, issuing release notes, performing community outreach etc.
After a suitable waiting period, the JMX code should be changed to declare serialVersionUID as a constant (`private static final`) using the "new" values, and extraneous fields should be removed. The documentation for the SVUID value can be removed from the javadoc, as the constant SVUID values will be listed automatically on the JDK's Serialized Form page.
See
- csr for
-
JDK-8339559 Remove serialVersionUID compatibility logic from JMX
- Closed
- relates to
-
JDK-6253903 Serialized Form javadoc for JMX API should list serialVersionUID of all serializable classes
- Closed
- links to
-
Commit(master) openjdk/jdk/3c40afa5
-
Review(master) openjdk/jdk/20856