6834805: Improve jar -C performance
authormartin
Mon, 22 Jun 2009 20:47:51 -0700
changeset 3056 0864d307b376
parent 3055 54b677070c61
child 3057 c5b370763c63
6834805: Improve jar -C performance Summary: Store "-C" directories in a HashSet, not List, to remove duplicates Reviewed-by: sherman Contributed-by: jeremymanson@google.com
jdk/src/share/classes/sun/tools/jar/Main.java
--- a/jdk/src/share/classes/sun/tools/jar/Main.java	Mon Jun 22 19:22:47 2009 -0700
+++ b/jdk/src/share/classes/sun/tools/jar/Main.java	Mon Jun 22 20:47:51 2009 -0700
@@ -56,7 +56,7 @@
     Set<File> entries = new LinkedHashSet<File>();
 
     // Directories specified by "-C" operation.
-    List<String> paths = new ArrayList<String>();
+    Set<String> paths = new HashSet<String>();
 
     CRC32 crc32 = new CRC32();
     /*