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.

Bug: https://bugs.openjdk.java.net/browse/JDK-8166584
Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8166584.0/

Thanks in advance for reviewing :)

Best regards

Reply via email to