8029018: (bf) Check src/share/native/java/nio/Bits.c for JNI pending excepitons

Chris Hegarty chris.hegarty at oracle.com
Fri Jan 3 05:33:37 PST 2014


The changes look fine to me.

I assume that the hotspot VM will not attempt to allocation any memory and always returns a pointer to the array. So as you say, this is really just to squash the warning, but would it not be better to continue to throw the Error AND then return?  Rather than just returning.

-Chris.

On 3 Jan 2014, at 12:41, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> 
> This is trivial update to Bits.c to squash a warning of potential JNI usage when there is a pending exception. This is the code that is used when copying between direct buffers of different endianness. The warning is that GetPrimitiveArrayCritical could potentially fail (with a pending exception) although in the case of HotSpot then I don't think this is possible so this change is really just to squash the warning.
> 
> The webrev with the change is here:
> 
> http://cr.openjdk.java.net/~alanb/8029018/webrev/
> 
> -Alan.



More information about the nio-dev mailing list