1.1 --- a/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java Thu Sep 03 18:34:17 2009 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java Tue Sep 08 11:12:13 2009 -0700 1.3 @@ -72,7 +72,7 @@ 1.4 public JavaFileObject getFileObject(RelativeDirectory subdirectory, String file) { 1.5 RelativeFile fullZipFileName = new RelativeFile(subdirectory, file); 1.6 ZipFileIndex.Entry entry = zfIndex.getZipIndexEntry(fullZipFileName); 1.7 - JavaFileObject ret = new ZipFileIndexFileObject(fileManager, zfIndex, entry, zfIndex.getZipFile().getPath()); 1.8 + JavaFileObject ret = new ZipFileIndexFileObject(fileManager, zfIndex, entry, zfIndex.getZipFile()); 1.9 return ret; 1.10 } 1.11 1.12 @@ -84,6 +84,7 @@ 1.13 zfIndex.close(); 1.14 } 1.15 1.16 + @Override 1.17 public String toString() { 1.18 return "ZipFileIndexArchive[" + zfIndex + "]"; 1.19 } 1.20 @@ -111,10 +112,10 @@ 1.21 1.22 /** The name of the zip file where this entry resides. 1.23 */ 1.24 - String zipName; 1.25 + File zipName; 1.26 1.27 1.28 - ZipFileIndexFileObject(JavacFileManager fileManager, ZipFileIndex zfIndex, ZipFileIndex.Entry entry, String zipFileName) { 1.29 + ZipFileIndexFileObject(JavacFileManager fileManager, ZipFileIndex zfIndex, ZipFileIndex.Entry entry, File zipFileName) { 1.30 super(fileManager); 1.31 this.name = entry.getFileName(); 1.32 this.zfIndex = zfIndex; 1.33 @@ -130,6 +131,7 @@ 1.34 return inputStream; 1.35 } 1.36 1.37 + @Override 1.38 protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) { 1.39 return fileManager.getDecoder(fileManager.getEncodingName(), ignoreEncodingErrors); 1.40 } 1.41 @@ -157,6 +159,7 @@ 1.42 1.43 /** @deprecated see bug 6410637 */ 1.44 @Deprecated 1.45 + @Override 1.46 public String getPath() { 1.47 return zipName + "(" + entry.getName() + ")"; 1.48 } 1.49 @@ -183,7 +186,7 @@ 1.50 } 1.51 1.52 public String getZipName() { 1.53 - return zipName; 1.54 + return zipName.getPath(); 1.55 } 1.56 1.57 public String getZipEntryName() { 1.58 @@ -191,9 +194,10 @@ 1.59 } 1.60 1.61 public URI toUri() { 1.62 - String zipName = new File(getZipName()).toURI().normalize().getPath(); 1.63 - String entryName = getZipEntryName(); 1.64 - return URI.create("jar:" + zipName + "!" + entryName); 1.65 + if (zfIndex.symbolFilePrefix != null) 1.66 + return createJarUri(zipName, zfIndex.symbolFilePrefix.path + entry.getName()); 1.67 + else 1.68 + return createJarUri(zipName, entry.getName()); 1.69 } 1.70 1.71 private byte[] read() throws IOException {