harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r574592 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
Date Tue, 11 Sep 2007 13:26:17 GMT
Author: hindessm
Date: Tue Sep 11 06:26:17 2007
New Revision: 574592

URL: http://svn.apache.org/viewvc?rev=574592&view=rev
Log:
Avoid some JNI check warnings.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c?rev=574592&r1=574591&r2=574592&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c Tue
Sep 11 06:26:17 2007
@@ -1007,6 +1007,7 @@
   static jbyte IPv6ANY[16] =
     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
   U_32 i = 0;
+  jobject result;
 
   /* check if the address being returned is the any address.  If so we need to check the
prefer flags to see how it should be returned
   (either as IPv4 Any or IPv6 ANY) */
@@ -1087,9 +1088,11 @@
           /* create using the scope id */
           tempClass = HARMONY_CACHE_GET (env, CLS_java_net_InetAddress);
           //tempClass = getJavaNetInetAddressClass(env);
-          return (*env)->CallStaticObjectMethod (env, tempClass,
+          result = (*env)->CallStaticObjectMethod (env, tempClass,
             tempMethodWithScope,
             byte_array, scope_id);
+          (*env)->ExceptionCheck(env);
+          return result;
         }
       else
         {
@@ -1099,8 +1102,10 @@
             HARMONY_CACHE_GET (env,
             MID_java_net_InetAddress_getByAddress_byteArray);
           //tempMethod = getJavaNetInetAddressGetByAddressByteArray(env);
-          return (*env)->CallStaticObjectMethod (env, tempClass, tempMethod,
+          result = (*env)->CallStaticObjectMethod (env, tempClass, tempMethod,
             byte_array);
+          (*env)->ExceptionCheck(env);
+          return result;
         }
     }
   else



Mime
View raw message