RFR [13] 8225426: Replace plain with system-default in Socket and ServerSocket
Alan Bateman
Alan.Bateman at oracle.com
Fri Jun 7 12:07:29 UTC 2019
On 07/06/2019 12:24, Chris Hegarty wrote:
> Another minor followup that we agreed to address after the integration
> of 8221481 (Reimplement the Legacy Socket API).
>
> Prior to 8221481, there was just a single default SocketImpl, the
> "plain" socket impl. There are now two, PlainSocketImpl and
> NioSocketImpl, the latter being the default. The former can be selected
> as the default by setting the `jdk.net.usePlainSocketImpl` system
> property, further information an be found in the Implementation Note of
> `java.net.SocketImpl`.
>
> The term "plain" is mentioned in a few places in the specification of
> j.n.Socket and j.n.ServerSocket. These should be updated to
> "system-default", which is the agreed term post 8221481.
>
Replacing with "plain" with system-default is okay but it does remind me
of problems in the other constructors. The no-arg Socket constructor is
currently specified to use a system-default SocketImpl but that isn't
correct when a client socket implementation factory is set. The
Socket(Proxy) constructor is also ambiguous for the Proxy.DIRECT case as
it's not clear which SocketImpl should be used. I'm not suggest these be
fixed too but there are a bunch of related issues in this area.
-Alan
More information about the net-dev
mailing list