harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r574875 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
Date Wed, 12 Sep 2007 10:04:16 GMT
Author: hindessm
Date: Wed Sep 12 03:04:12 2007
New Revision: 574875

URL: http://svn.apache.org/viewvc?rev=574875&view=rev
Log:
Avoid looking up a class that we only recently added to the cache.

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=574875&r1=574874&r2=574875&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 Wed
Sep 12 03:04:12 2007
@@ -112,6 +112,11 @@
     return;
   HARMONY_CACHE_SET (env, MID_java_net_InetAddress_preferIPv6Addresses, mid);
 
+  mid = (*env)->GetMethodID (env, lookupClass, "<init>", "()V");
+  if (!mid)
+    return;
+  HARMONY_CACHE_SET (env, MID_java_net_InetAddress_init, mid);
+
   if (ipv6_support)
     {
       /* static InetAddress getByAddress( String name, byte[] address ) */
@@ -198,11 +203,6 @@
   if (!globalRef)
     return;
   HARMONY_CACHE_SET (env, CLS_java_net_Inet6Address, globalRef);
-  lookupClass = HARMONY_CACHE_GET (env, CLS_java_net_InetAddress);
-  mid = (*env)->GetMethodID (env, lookupClass, "<init>", "()V");
-  if (!mid)
-    return;
-  HARMONY_CACHE_SET (env, MID_java_net_InetAddress_init, mid);
   
 }
 



Mime
View raw message