Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 8210 invoked from network); 12 Sep 2007 20:03:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Sep 2007 20:03:09 -0000 Received: (qmail 28919 invoked by uid 500); 12 Sep 2007 20:03:02 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 28899 invoked by uid 500); 12 Sep 2007 20:03:02 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 28890 invoked by uid 99); 12 Sep 2007 20:03:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 13:03:02 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 20:03:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 34B2D1A9832; Wed, 12 Sep 2007 13:02:48 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@harmony.apache.org From: hindessm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070912200248.34B2D1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);