JDK-8253967 : Delete the outdated java.awt.PeerFixer class
  • Type: CSR
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 16
  • Submitted: 2020-10-03
  • Updated: 2020-10-08
  • Resolved: 2020-10-08
Related Reports
CSR :  

The java.awt package has an unspecified non-public class.


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.


Instead of adding a specification to this old/unused class, I suggest deleting it.


No specification changes.
[~serb], after compatibility clarification approving with JDK 16 with a release note, out of an abundance of caution.

I have added a comment for this class describing why it was placed there to the description of the CSR.

Moving to Provisional; not Approved. Please provide a more detailed analysis of the compatibility impact before re-Finalizing the request.