8218559: Reimplement the Legacy Socket API

Alan Bateman Alan.Bateman at oracle.com
Wed May 1 13:10:13 UTC 2019


JEP 353 [1] is now a candidate and I would like to get the CSR [2] 
finalized and the changes reviewed so that it can be targeted.

The webrev with the changes is here:
    http://cr.openjdk.java.net/~alanb/8221481/1/webrev/index.html

The new implementation is one source file; the only other code change is 
to SocketImpl.createPlatformSocketImpl to select the implementation 
based on the system property jdk.net.usePlainSocketImpl. The reason the 
patch isn't too big is that all the "enabling changes" are already in 
jdk/jdk.

We added additional tests a few weeks ago via JDK-8221259 [3] to test 
long standing behavior. The webrev adds a few additional tests, the main 
new one is to test that the SocketImpl is reliable in the fact of usages 
that are not specified by SocketImpl. A selection of existing tests are 
also updated to run with both the old and new implementation - the 
motive of this is to ensure that the old implementation doesn't bit rot 
before it is removed.

Once the changes are in a promoted build then we'll need help testing. 
The best outcome is that nobody notices :-)  Rory O'Donnell, with his 
OpenJDK quality outreach hat on, has agreed to contact the projects 
tracked by that program to test the EA builds when they are available.

-Alan

[1] https://openjdk.java.net/jeps/353
[2] https://bugs.openjdk.java.net/browse/JDK-8222028
[3] https://bugs.openjdk.java.net/browse/JDK-8221259


More information about the net-dev mailing list