src/share/classes/java/util/jar/JarFile.java

Print this page
rev 4793 : 7117249: java.util warnings patches from LJC/Mike Barker

*** 181,191 **** jv = new JarVerifier(b); } } else { man = new Manifest(super.getInputStream(manEntry)); } ! manRef = new SoftReference(man); } } return man; } --- 181,191 ---- jv = new JarVerifier(b); } } else { man = new Manifest(super.getInputStream(manEntry)); } ! manRef = new SoftReference<Manifest>(man); } } return man; }
*** 231,241 **** /** * Returns an enumeration of the zip file entries. */ public Enumeration<JarEntry> entries() { ! final Enumeration enum_ = super.entries(); return new Enumeration<JarEntry>() { public boolean hasMoreElements() { return enum_.hasMoreElements(); } public JarFileEntry nextElement() { --- 231,241 ---- /** * Returns an enumeration of the zip file entries. */ public Enumeration<JarEntry> entries() { ! final Enumeration<? extends ZipEntry> enum_ = super.entries(); return new Enumeration<JarEntry>() { public boolean hasMoreElements() { return enum_.hasMoreElements(); } public JarFileEntry nextElement() {
*** 606,616 **** if (jv != null) { return jv.entries2(this, super.entries()); } // screen out entries which are never signed ! final Enumeration enum_ = super.entries(); return new Enumeration<JarEntry>() { ZipEntry entry; public boolean hasMoreElements() { --- 606,616 ---- if (jv != null) { return jv.entries2(this, super.entries()); } // screen out entries which are never signed ! final Enumeration<? extends ZipEntry> enum_ = super.entries(); return new Enumeration<JarEntry>() { ZipEntry entry; public boolean hasMoreElements() {
*** 647,666 **** /* * JAR file has no signed content. Is there a non-signing * code source? */ ! Enumeration unsigned = unsignedEntryNames(); if (unsigned.hasMoreElements()) { return new CodeSource[]{JarVerifier.getUnsignedCS(url)}; } else { return null; } } private Enumeration<String> unsignedEntryNames() { ! final Enumeration entries = entries(); return new Enumeration<String>() { String name; /* --- 647,666 ---- /* * JAR file has no signed content. Is there a non-signing * code source? */ ! Enumeration<String> unsigned = unsignedEntryNames(); if (unsigned.hasMoreElements()) { return new CodeSource[]{JarVerifier.getUnsignedCS(url)}; } else { return null; } } private Enumeration<String> unsignedEntryNames() { ! final Enumeration<JarEntry> entries = entries(); return new Enumeration<String>() { String name; /*