RFR(XS): 8166584: Remove obsolete utility function NET_ThrowSocketException in windows libnet
christoph.langer at sap.com
Thu Sep 22 20:59:29 UTC 2016
while looking at utility functions for creating exceptions in libjava/libnet I found a small spot that should be consolidated right away.
The function NET_ThrowSocketException does only exist in the windows native implementation and is only used in 3 places in SocketInputStream.c. I removed this in favor of directly calling JNU_ThrowByName as the Unix variant of that code already does.
In that function Java_java_net_SocketInputStream_socketRead0 I also replaced throwing a SocketException with throwing an NPE in the rare case that a the JNI input for the file descriptor is null. That's probably more natural and should virtually never occur anyways.
Thanks in advance for reviewing :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the net-dev