commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1232153 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java
Date Mon, 16 Jan 2012 20:40:49 GMT
Author: ggregory
Date: Mon Jan 16 20:40:48 2012
New Revision: 1232153

URL: http://svn.apache.org/viewvc?rev=1232153&view=rev
Log:
Change: new ArrayList<ZipFileObject>(100);
to: new ArrayList<ZipFileObject>(getZipFile().size());
because: the method will create at least new "getZipFile().size()" entries.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java?rev=1232153&r1=1232152&r2=1232153&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/zip/ZipFileSystem.java
Mon Jan 16 20:40:48 2012
@@ -87,7 +87,7 @@ public class ZipFileSystem extends Abstr
         try
         {
             // Build the index
-            List<ZipFileObject> strongRef = new ArrayList<ZipFileObject>(100);
+            List<ZipFileObject> strongRef = new ArrayList<ZipFileObject>(getZipFile().size());
             Enumeration<? extends ZipEntry> entries = getZipFile().entries();
             while (entries.hasMoreElements())
             {



Mime
View raw message