Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 23468 invoked from network); 9 Jul 2008 15:43:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2008 15:43:42 -0000 Received: (qmail 2789 invoked by uid 500); 9 Jul 2008 15:43:43 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 2767 invoked by uid 500); 9 Jul 2008 15:43:43 -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 2758 invoked by uid 99); 9 Jul 2008 15:43:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 08:43:43 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 15:42:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0822123889F1; Wed, 9 Jul 2008 08:43:22 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r675234 - /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java Date: Wed, 09 Jul 2008 15:43:21 -0000 To: commits@harmony.apache.org From: sjanuary@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080709154322.0822123889F1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sjanuary Date: Wed Jul 9 08:43:20 2008 New Revision: 675234 URL: http://svn.apache.org/viewvc?rev=675234&view=rev Log: Apply second patch for HARMONY-5902 ([classlib][pack200] ClassConstantPool overuses ArrayLists) Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java?rev=675234&r1=675233&r2=675234&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java (original) +++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/unpack200/bytecode/ClassConstantPool.java Wed Jul 9 08:43:20 2008 @@ -113,15 +113,13 @@ } private void addNested(List classFileEntries) { - List newEntries = new ArrayList(); - for (int classFileIndex = 0; classFileIndex < classFileEntries.size(); classFileIndex++) { ClassFileEntry entry = (ClassFileEntry) classFileEntries.get(classFileIndex); ClassFileEntry[] nestedEntries = entry.getNestedClassFileEntries(); // Add all nestedEntries to the newEntries list for(int nestedEntriesIndex = 0; nestedEntriesIndex < nestedEntries.length; nestedEntriesIndex++) { - newEntries.add(nestedEntries[nestedEntriesIndex]); + add(nestedEntries[nestedEntriesIndex]); } // If the entry is a bytecode that needs to start the @@ -135,9 +133,6 @@ } } } - for (Iterator iterator = newEntries.iterator(); iterator.hasNext();) { - add((ClassFileEntry) iterator.next()); - } } protected void initializeIndexCache() {