Hi Ivan, thanks for explanation, code change looks good to me.
Thanks, Vyom On Thu, Mar 21, 2019 at 11:26 AM Ivan Gerasimov <ivan.gerasi...@oracle.com> wrote: > 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.gerasi...@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/ >> >> Thanks in advance! >> >> -- >> With kind regards, >> Ivan Gerasimov >> >> > > -- > Thanks, > Vyom > > > -- > With kind regards, > Ivan Gerasimov > > -- Thanks, Vyom