harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
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 GMT
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() {



Mime
View raw message