Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253967

Delete the outdated java.awt.PeerFixer class

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 16
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      low
    • Compatibility Risk Description:
      Hide
      This will affect the objects serialized after jdk1.1 and prior to jdk1.1.1
      However JDK 1.1 has been unsupported for ~ 20 years, so it seems
      unlikely to be an interoperability issue with JDk 16 and later.
      Show
      This will affect the objects serialized after jdk1.1 and prior to jdk1.1.1 However JDK 1.1 has been unsupported for ~ 20 years, so it seems unlikely to be an interoperability issue with JDk 16 and later.
    • Interface Kind:
      Java API, Other
    • Scope:
      JDK

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                serb Sergey Bylokhov
                Reviewed By:
                Philip Race
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: