RFR 8170494 : JNI exception pending in PlainDatagramSocketImpl.c

Ivan Gerasimov ivan.gerasimov at oracle.com
Thu Mar 21 05:57:27 UTC 2019


Thanks Vyom!


On 3/20/19 10:13 PM, Vyom Tiwari wrote:
> Hi Ivan,
>
> Looks OK to me,  in case of exception "ni"  will be null you can use 
> the macro(CHECK_NULL_RETURN) if you are not clearing the JNI 
> exception, this will save at least one additional function( 
> "(*env)->ExceptionOccurred(env)" ) call.

Java_java_net_NetworkInterface_getByInetAddress0 may return NULL if 
there were no interfaces found.
We should not return from getMulticastInterface() in this case.

With kind regards,
Ivan

>
> Thanks,
> Vyom
>
> On Wed, Mar 20, 2019 at 9:49 PM Ivan Gerasimov 
> <ivan.gerasimov at oracle.com <mailto:ivan.gerasimov at oracle.com>> wrote:
>
>     Hello!
>
>     The function Java_java_net_NetworkInterface_getByInetAddress0 may
>     throw,
>     so after calling it we need to check if an exception is pending.
>
>     Would you please help review a one-line fix?
>
>     BUGURL: https://bugs.openjdk.java.net/browse/JDK-8170494
>     WEBREV: http://cr.openjdk.java.net/~igerasim/8170494/00/webrev/
>     <http://cr.openjdk.java.net/%7Eigerasim/8170494/00/webrev/>
>
>     Thanks in advance!
>
>     -- 
>     With kind regards,
>     Ivan Gerasimov
>
>
>
> -- 
> Thanks,
> Vyom

-- 
With kind regards,
Ivan Gerasimov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190320/b5ef9289/attachment-0001.html>


More information about the net-dev mailing list