harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r576791 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
Date Tue, 18 Sep 2007 09:15:05 GMT
Author: hindessm
Date: Tue Sep 18 02:15:04 2007
New Revision: 576791

URL: http://svn.apache.org/viewvc?rev=576791&view=rev
Log:
Check for exceptions to avoid 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=576791&r1=576790&r2=576791&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 18 02:15:04 2007
@@ -1038,6 +1038,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 = NULL;
 
   aString = (*env)->NewStringUTF (env, hostName);
 
@@ -1114,9 +1115,11 @@
         {
           /* create using the scope id */
           tempClass = HARMONY_CACHE_GET (env, CLS_java_net_InetAddress);
-          return (*env)->CallStaticObjectMethod (env, tempClass,
-            tempMethodWithScope, aString,
-            byte_array, scope_id);
+          result = (*env)->CallStaticObjectMethod (env, tempClass,
+                                                   tempMethodWithScope, aString,
+                                                   byte_array, scope_id);
+          (*env)->ExceptionCheck(env);
+          return result;
         }
       else
         {
@@ -1125,8 +1128,10 @@
             HARMONY_CACHE_GET (env,
             MID_java_net_InetAddress_getByAddress_Ljava_lang_String_byteArray);
           
-          return (*env)->CallStaticObjectMethod (env, tempClass, tempMethod,
-            aString, byte_array);
+          result = (*env)->CallStaticObjectMethod (env, tempClass, tempMethod,
+                                                   aString, byte_array);
+          (*env)->ExceptionCheck(env);
+          return result;
         }
       }
     else
@@ -1136,8 +1141,10 @@
           HARMONY_CACHE_GET (env,
           MID_java_net_InetAddress_init_byteArrayLjava_lang_String);
         
-        return (*env)->NewObject (env, tempClass, tempMethod, byte_array,
-          aString);
+        result = (*env)->NewObject (env, tempClass, tempMethod, byte_array,
+                                    aString);
+        (*env)->ExceptionCheck(env);
+        return result;
     }
 }
 



Mime
View raw message