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

Remove the legacy PlainSocketImpl and PlainDatagramSocketImpl implementation

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 18
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b06

      Description

      In JDK 13, JEP 353 has provided a drop in replacement for the legacy PlainSocketImpl implementation. Since JDK 13, the PlainSocketImpl implementation is no longer used. However, JEP 353 also included a mitigation mechanism to reduce compatibility risks:

      "To reduce the risk of switching the implementation after more than twenty years, the old implementation will not be removed. The old implementation will remain in the JDK and a system property will be introduced to configure the JDK to use the old implementation. The JDK-specific system property to switch to the old implementation is jdk.net.usePlainSocketImpl. If set, or set to the value true, at startup, then the old implementation will be used. Some future release will remove PlainSocketImpl and the system property."

      Similarly, in JDK 15, JEP 373 has provided a new implementation for DatagramSocket and MulticastSocket, with a JDK-specific property "jdk.net.usePlainDatagramSocketImpl" allowing to switch back to the old implementation in case of compatibility issue.

      "To reduce the risk of switching the implementation after more than twenty years, the legacy implementation will not be removed. A JDK-specific system property, jdk.net.usePlainDatagramSocketImpl, is introduced to configure the JDK to use the legacy implementation (see risks and assumptions, below). If set with no value or set to the value ”true" at startup, the legacy implementation is used. Otherwise, the new (NIO-based) implementation is used. In some future release we will remove the legacy implementation and the system property. "

      The PlainSocketImpl and PlainDatagramSocketImpl implementations and associated native code are therefore still present in the JDK, and represent a maintenance burden that we should be looking at removing definitively.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pconcannon Patrick Concannon
              Reporter:
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: