8217500: (sc) Move SocketChannelImpl's remaining native methods to Net

Alan Bateman Alan.Bateman at oracle.com
Tue Jan 22 11:14:05 UTC 2019


This is another refactoring patch, this time to move the two remaining 
(socket oriented) native methods from sun.nio.ch.SocketChannelImpl to 
sun.nio.ch.Net. This will make the sun.nio.ch.Net class more useful, 
more on this soon. I've used the opportunity to remove the Unix version 
of SocketDispatcher.c has that has not been needed since the switch to 
the new build system in JDK 8.

One small complication with this refactoring is technical debt in the 
SCTP implementation where it was makes direct use of the native method 
SocketChannelImpl.checkConnect. That usage seems to be broken since JDK 
11 but has gone unnoticed, maybe because there aren't too many deploying 
doing non-blocking connects with SCTP.  The SCTP tests that exercise 
this code path are passing on the systems that I can find with SCTP support.

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

-Alan


More information about the nio-dev mailing list