RFR: 8028725: [Parfait] warnings from b116 for jdk.src.solaris.native.java.net: JNI pending exceptions

2014-02-04 Thread Michael McMahon

Adding some checks for pending exceptions in the InetAddress native code.

http://cr.openjdk.java.net/~michaelm/8028725/webrev.1/

Thanks
Michael


Re: RFR: 8028725: [Parfait] warnings from b116 for jdk.src.solaris.native.java.net: JNI pending exceptions

2014-02-04 Thread Alan Bateman

On 04/02/2014 11:05, Michael McMahon wrote:

Adding some checks for pending exceptions in the InetAddress native code.

http://cr.openjdk.java.net/~michaelm/8028725/webrev.1/

This looks okay to me. Does the Windows code need the same changes?

-Alan


Re: RFR: 8028725: [Parfait] warnings from b116 for jdk.src.solaris.native.java.net: JNI pending exceptions

2014-02-04 Thread Alan Bateman

On 04/02/2014 11:24, Alan Bateman wrote:

On 04/02/2014 11:05, Michael McMahon wrote:
Adding some checks for pending exceptions in the InetAddress native 
code.


http://cr.openjdk.java.net/~michaelm/8028725/webrev.1/

This looks okay to me. Does the Windows code need the same changes?
Ignore my mail, I read it as Inet4* and Inet6* but I see you've done 
both the Unix and Windows implementation.


-Alan.


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

2014-02-04 Thread Chris Hegarty

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


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

2014-02-04 Thread Chris Hegarty

And a link to the webrev that can people can access:

 http://cr.openjdk.java.net/~chegar/nativeInetCleanup/webrev/

-Chris.

On 02/04/2014 04:01 PM, Chris Hegarty wrote:

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



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

2014-02-04 Thread Michael McMahon

Nice cleanup. Looks good, and thanks for catching the CHECK_NULL problem

Michael

On 04/02/14 16:12, Chris Hegarty wrote:

And a link to the webrev that can people can access:

 http://cr.openjdk.java.net/~chegar/nativeInetCleanup/webrev/

-Chris.

On 02/04/2014 04:01 PM, Chris Hegarty wrote:

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 







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

2014-02-04 Thread Alan Bateman

On 04/02/2014 16:12, Chris Hegarty wrote:

And a link to the webrev that can people can access:

 http://cr.openjdk.java.net/~chegar/nativeInetCleanup/webrev/

-Chris.

This is a good clean-up and looks good to me.

-Alan.