src/java.base/share/classes/java/util/jar/JarVerifier.java

Print this page

        

@@ -722,37 +722,37 @@
 
     /*
      * Like entries() but screens out internal JAR mechanism entries
      * and includes signed entries with no ZIP data.
      */
-    public Enumeration<JarEntry> entries2(final JarFile jar, Enumeration<? extends ZipEntry> e) {
+    public Enumeration<JarEntry> entries2(final JarFile jar, Enumeration<JarEntry> e) {
         final Map<String, CodeSigner[]> map = new HashMap<>();
         map.putAll(signerMap());
-        final Enumeration<? extends ZipEntry> enum_ = e;
+        final Enumeration<JarEntry> enum_ = e;
         return new Enumeration<>() {
 
             Enumeration<String> signers = null;
             JarEntry entry;
 
             public boolean hasMoreElements() {
                 if (entry != null) {
                     return true;
                 }
                 while (enum_.hasMoreElements()) {
-                    ZipEntry ze = enum_.nextElement();
-                    if (JarVerifier.isSigningRelated(ze.getName())) {
+                    JarEntry je = enum_.nextElement();
+                    if (JarVerifier.isSigningRelated(je.getName())) {
                         continue;
                     }
-                    entry = jar.newEntry(ze);
+                    entry = jar.newEntry(je);
                     return true;
                 }
                 if (signers == null) {
                     signers = Collections.enumeration(map.keySet());
                 }
                 while (signers.hasMoreElements()) {
                     String name = signers.nextElement();
-                    entry = jar.newEntry(new ZipEntry(name));
+                    entry = jar.newEntry(name);
                     return true;
                 }
 
                 // Any map entries left?
                 return false;