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

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

@@ -181,11 +181,11 @@
                         jv = new JarVerifier(b);
                     }
                 } else {
                     man = new Manifest(super.getInputStream(manEntry));
                 }
-                manRef = new SoftReference(man);
+                manRef = new SoftReference<Manifest>(man);
             }
         }
         return man;
     }
 

@@ -231,11 +231,11 @@
 
     /**
      * Returns an enumeration of the zip file entries.
      */
     public Enumeration<JarEntry> entries() {
-        final Enumeration enum_ = super.entries();
+        final Enumeration<? extends ZipEntry> enum_ = super.entries();
         return new Enumeration<JarEntry>() {
             public boolean hasMoreElements() {
                 return enum_.hasMoreElements();
             }
             public JarFileEntry nextElement() {

@@ -606,11 +606,11 @@
         if (jv != null) {
             return jv.entries2(this, super.entries());
         }
 
         // screen out entries which are never signed
-        final Enumeration enum_ = super.entries();
+        final Enumeration<? extends ZipEntry> enum_ = super.entries();
         return new Enumeration<JarEntry>() {
 
             ZipEntry entry;
 
             public boolean hasMoreElements() {

@@ -647,20 +647,20 @@
 
         /*
          * JAR file has no signed content. Is there a non-signing
          * code source?
          */
-        Enumeration unsigned = unsignedEntryNames();
+        Enumeration<String> unsigned = unsignedEntryNames();
         if (unsigned.hasMoreElements()) {
             return new CodeSource[]{JarVerifier.getUnsignedCS(url)};
         } else {
             return null;
         }
     }
 
     private Enumeration<String> unsignedEntryNames() {
-        final Enumeration entries = entries();
+        final Enumeration<JarEntry> entries = entries();
         return new Enumeration<String>() {
 
             String name;
 
             /*