-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
low
-
-
Java API, Other
-
JDK
Summary
The java.awt package has an unspecified non-public class.
Problem
The java.awt.PeerFixer class extends the Serializable interface and required a proper specification, otherwise the spec check produces the warning, see JDK-8251123:
src/java.desktop/share/classes/java/awt/ScrollPane.java:837: warning: no comment class PeerFixer implements AdjustmentListener, java.io.Serializable {
This is the comment added to this class, describing why it was placed there:
/*
* In JDK 1.1.1, the pkg private class java.awt.PeerFixer was moved to
* become an inner class of ScrollPane, which broke serialization
* for ScrollPane objects using JDK 1.1.
* Instead of moving it back out here, which would break all JDK 1.1.x
* releases, we keep PeerFixer in both places. Because of the scoping rules,
* the PeerFixer that is used in ScrollPane will be the one that is the
* inner class. This pkg private PeerFixer class below will only be used
* if the Java 2 platform is used to deserialize ScrollPane objects that were serialized
* using JDK1.1
*/
So we have two same classes:
- First is used for the deserialization of classes from JDK 1.1.1+
- Second is used for the deserialization of classes from JDK 1.1 but prior JDK1.1.1
This CSR is a request to remove the second class.
Solution
Instead of adding a specification to this old/unused class, I suggest deleting it.
Specification
No specification changes.
- csr of
-
JDK-8253965 Delete the outdated java.awt.PeerFixer class
-
- Resolved
-