harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r575056 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
Date Wed, 12 Sep 2007 20:02:47 GMT
Author: hindessm
Date: Wed Sep 12 13:02:39 2007
New Revision: 575056

URL: http://svn.apache.org/viewvc?rev=575056&view=rev
Log:
Avoid populating the cache more than once.

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=575056&r1=575055&r2=575056&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 13:02:39 2007
@@ -36,6 +36,11 @@
   jfieldID fid;
   jobject globalRef;
 
+  if (HARMONY_CACHE_GET (env, CLS_java_lang_Boolean)) {
+    /* Cache is already initialized */
+    return;
+  }
+
   /* Set the Harmony ID cache to use IPv6 address support */
   HARMONY_CACHE_SET (env, harmony_supports_ipv6, ipv6_support);
 



Mime
View raw message