RFR: 8253119: Remove the legacy PlainSocketImpl and PlainDatagramSocketImpl implementation [v4]

Alan Bateman alanb at openjdk.java.net
Fri Jun 25 10:59:10 UTC 2021


On Fri, 25 Jun 2021 10:25:52 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

>> Hi,
>> 
>> Could someone please review my changes for the removal of the legacy `PlainSocketImpl` and `PlainDatagramSocketImpl` implementations?
>> 
>> In JDK 13, JEP 353 provided a drop in replacement for the legacy `PlainSocketImpl` implementation. Since JDK 13, the `PlainSocketImpl` implementation was no longer used but included a mitigation mechanism to reduce compatibility risks in the form of a JDK-specific property `jdk.net.usePlainSocketImpl` allowing to switch back to the old implementation. 
>> Similarly, in JDK 15, JEP 373 provided a new implementation for `DatagramSocket` and `MulticastSocket`, with a JDK-specific property `jdk.net.usePlainDatagramSocketImpl` also allowing the user to switch back to the old implementation in case of compatibility issue.
>> 
>> As these implementations (and the mechanisms they use to enable them to mitigate compatibility issues) have been deemed no longer necessary, they now represent a maintenance burden. This patch looks at removing them from the JDK.
>> 
>> Kind regards,
>> Patrick
>
> Patrick Concannon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
> 
>  - 8253119: Added message to null check in java/net/DatagramSocket
>  - Merge remote-tracking branch 'origin/master' into JDK-8253119
>  - 8253119: Removed redundant comments and USE_PLAINDATAGRAMSOCKET from java/net/DatagramSocket
>  - Merge remote-tracking branch 'origin/master' into JDK-8253119
>  - 8253119: Remove the legacy PlainSocketImpl and PlainDatagramSocketImpl implementation

src/java.base/share/classes/java/net/DatagramSocket.java line 1398:

> 1396:                 DatagramSocketImpl impl = factory.createDatagramSocketImpl();
> 1397:                 Objects.requireNonNull(impl,
> 1398:                         "Implementation returned by installed DatagramSocketFactoryImpl is null");

I think you mean "DatagramSocketFactoryImpl" rather than "DatagramSocketImplFactory" here.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4574


More information about the serviceability-dev mailing list