# HG changeset patch # User mcimadamore # Date 1340108758 -3600 # Node ID cb848b70d7f4ae465cd344c7d59de8e55d8e76dd # Parent 7fdae33b1abda2c7e21369fd7fa1ada5885d4601 7177701: error: Filling jar message during javax/imageio/metadata/IIOMetadataFormatImpl compilation Summary: Recent JDK hash changes affected order in which files are returned from JavacFileManager.list() Reviewed-by: jjg diff -r 7fdae33b1abd -r cb848b70d7f4 langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java --- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java Sun Jun 17 21:37:21 2012 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java Tue Jun 19 13:25:58 2012 +0100 @@ -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(directories.keySet()); + allDirs = new java.util.LinkedHashSet(directories.keySet()); } return allDirs; @@ -572,7 +573,7 @@ // Add each of the files if (entryCount > 0) { - directories = new HashMap(); + directories = new LinkedHashMap(); ArrayList entryList = new ArrayList(); int pos = 2; for (int i = 0; i < entryCount; i++) { @@ -867,7 +868,7 @@ if (zipFile.lastModified() != fileStamp) { ret = false; } else { - directories = new HashMap(); + directories = new LinkedHashMap(); int numDirs = raf.readInt(); for (int nDirs = 0; nDirs < numDirs; nDirs++) { int dirNameBytesLen = raf.readInt();