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

Patrick Concannon pconcannon at openjdk.java.net
Thu Jun 24 11:44:23 UTC 2021


On Wed, 23 Jun 2021 13:09:53 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> I assume DatagramSocket L1043-L1049 (declaration/init of USE_PLAINDATAGRAMSOCKET) can be removed too.

USE_PLAINDATAGRAMSOCKET removed as requested. See 49125e7

> src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java line 69:
> 
>> 67:  * This implementation attempts to be compatible with legacy PlainSocketImpl
>> 68:  * (removed in JDK18), including behavior and exceptions that are not specified by
>> 69:  * SocketImpl.
> 
> Maybe we should just drop this sentence and not attempt to replace it.

Comment removed. See 49125e7

> src/java.base/share/classes/sun/nio/ch/NioSocketImpl.java line 647:
> 
>> 645:             // set the address field to the given host address to keep
>> 646:             // compatibility with SocketImpl. When binding to 0.0.0.0
>> 647:             // then the actual local address will be ::0 when IPv6 is enabled.
> 
> I don't think "SocketImpl" works here. Maybe replace "keep compatibility with PlainSocketImpl" with "to maintain long standing behavior".

Wording replaced as suggested. See 49125e7

> src/jdk.jdwp.agent/windows/native/libdt_socket/socket_md.c line 269:
> 
>> 267: 
>> 268: /*
>> 269:  * Below Adapted from PlainSocketImpl.c (removed in JDK18), win32 version 1.18.
> 
> I think we'll need decide whether to keep this comment or not, I would be tempted to re-write it.

I've removed the comment after discussing this offline. See 49125e7

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

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


More information about the nio-dev mailing list