changeset 1277:3468648bb521

Merge
author lana
date Thu, 21 Jun 2012 23:19:36 -0700
parents a0550cd75339 (diff) 47ae28da5088 (current diff)
children 66c671f28cb2
files
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Mon Jun 18 14:36:35 2012 -0700
+++ b/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Jun 21 23:19:36 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@
 import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Collections;
+import java.util.LinkedHashMap;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -284,7 +285,7 @@
         try {
             checkIndex();
             if (allDirs == Collections.EMPTY_SET) {
-                allDirs = new HashSet<RelativeDirectory>(directories.keySet());
+                allDirs = new java.util.LinkedHashSet<RelativeDirectory>(directories.keySet());
             }
 
             return allDirs;
@@ -572,7 +573,7 @@
 
             // Add each of the files
             if (entryCount > 0) {
-                directories = new HashMap<RelativeDirectory, DirectoryEntry>();
+                directories = new LinkedHashMap<RelativeDirectory, DirectoryEntry>();
                 ArrayList<Entry> entryList = new ArrayList<Entry>();
                 int pos = 2;
                 for (int i = 0; i < entryCount; i++) {
@@ -867,7 +868,7 @@
                 if (zipFile.lastModified() != fileStamp) {
                     ret = false;
                 } else {
-                    directories = new HashMap<RelativeDirectory, DirectoryEntry>();
+                    directories = new LinkedHashMap<RelativeDirectory, DirectoryEntry>();
                     int numDirs = raf.readInt();
                     for (int nDirs = 0; nDirs < numDirs; nDirs++) {
                         int dirNameBytesLen = raf.readInt();