RFR: 8025293 - JNI exception pending checks in java.net

Mark Sheppard mark.sheppard at oracle.com
Tue Mar 4 03:41:39 PST 2014


Chris,
   thanks for the response.
I can use the common CHECK_NULL_RETURN convention if preferred.
The reason I went with if ( name_utf != NULL) { ...} else { ...} is 
because the != NULL is the most
likely code path in getByName.

Nonetheless, I'll make the change for consistency.

regards
Mark

On 04/03/2014 11:27, Chris Hegarty wrote:
> This looks good to me Mark.
>
> Trivially, and it is more of a stylistic preference, towards the end of the Solaris NetworkInterface.c I would remove the if (ob) … else, and use CHECK_NULL_RETURN(obj, NULL). But, what you have is right, either is fine.
>
> -Chris.
>
> On 4 Mar 2014, at 11:06, Mark Sheppard <mark.sheppard at oracle.com> wrote:
>
>> Hi
>>   please oblige and review the following changes
>>
>> http://cr.openjdk.java.net/~msheppar/8025293/webrev/
>>
>> to address the issue in
>>
>> https://bugs.openjdk.java.net/browse/JDK-8025293
>>
>> this applies additional checks after JNI native calls in
>> src/solaris/native/java/net/NetworkInterface.c
>> src/windows/native/java/net/NetworkInterface.c
>>
>> The main changes are NULL checks and pending exception checks.
>>
>> regards
>> Mark



More information about the net-dev mailing list