Review Request for JDK-8033571: [parfait] warning from b128 for security/smartcardio/pcsc_md.c: JNI exception pending

Valerie (Yu-Ching) Peng valerie.peng at oracle.com
Wed Mar 5 21:57:10 UTC 2014


I just feel that using ExceptionCheck call (than null), it's more 
obvious that there is already a pending exception.
So, for me, it offers more clarity, comparing to checking for null which 
some JNI calls return when errors are encountered (however, there may be 
no pending exceptions at least according to JNI spec, e.g. no 
corresponding "THROWS" paragraph.

Thanks for the review,
Valerie

On 03/05/14 11:50, Anthony Scarpino wrote:
> On 02/13/2014 03:29 PM, Valerie (Yu-Ching) Peng wrote:
>>
>> Can someone please review the fixes which checks for pending exceptions
>> in native code "pcsc_md.c"?
>> The fix is trivial scope-wise.
>>
>> Webrev: http://cr.openjdk.java.net/~valeriep/8033571/webrev.00/
>>
>> Thanks,
>> Valerie
>
> In my change that's out for review, 8036543, I only checked for 
> findFunction() returning null, while you used ExceptionCheck.  Was 
> there something you saw that caused you to check for an exception 
> thrown rather than null?
>
> Either way the change looks good to me.
>
> Tony
>




More information about the security-dev mailing list