RFR [9] Inet[4|6]Address class and fieldID initialization in networking native code

Chris Hegarty chris.hegarty at oracle.com
Tue Feb 4 08:01:11 PST 2014


Hi,

This change is mainly about clean up of the networking native code. 
There are a number of places that cache JNI global references to the 
Inet[4|6]Address classes, as well as caching their respective field IDs. 
It is also difficult to correctly handle propagation of possible JNI 
method invocation failures, from the (get|set)Inet[4|6]Address_XXX methods.

As it happens Inet[4|6]Address.c already makes these classes and field 
IDs available [1] [2] [3]. It is then a small matter of ensuring that 
they get initialized from any entry point that may use them, in the 
various socket/InetAddress/network interface implementation, as well as 
NIO and SCTP.

Webrev:
 
http://chhegar.ie.oracle.com/chhegar/repos/jdk9/dev/serial/jdk/nativeInetCleanup.01/webrev/

-Chris.

[1] 
http://hg.openjdk.java.net/jdk9/dev/jdk/file/tip/src/share/native/java/net/InetAddress.c
[2] 
http://hg.openjdk.java.net/jdk9/dev/jdk/file/tip/src/share/native/java/net/Inet4Address.c
[3] 
http://hg.openjdk.java.net/jdk9/dev/jdk/file/tip/src/share/native/java/net/Inet6Address.c


More information about the net-dev mailing list