src/java.base/share/classes/jdk/internal/module/ModuleReferences.java

Print this page

        

@@ -48,13 +48,11 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import java.util.zip.ZipFile;
 
 import jdk.internal.jmod.JmodFile;
-import jdk.internal.misc.SharedSecrets;
 import jdk.internal.module.ModuleHashes.HashSupplier;
-import jdk.internal.util.jar.VersionedStream;
 import sun.net.www.ParseUtil;
 
 
 /**
  * A factory for creating ModuleReference implementations where the modules are

@@ -248,11 +246,11 @@
         @Override
         Optional<URI> implFind(String name) throws IOException {
             JarEntry je = getEntry(name);
             if (je != null) {
                 if (jf.isMultiRelease())
-                    name = SharedSecrets.javaUtilJarAccess().getRealName(jf, je);
+                    name = je.getRealName();
                 if (je.isDirectory() && !name.endsWith("/"))
                     name += "/";
                 String encodedPath = ParseUtil.encodePath(name, false);
                 String uris = "jar:" + uri + "!/" + encodedPath;
                 return Optional.of(URI.create(uris));

@@ -272,11 +270,11 @@
         }
 
         @Override
         Stream<String> implList() throws IOException {
             // take snapshot to avoid async close
-            List<String> names = VersionedStream.stream(jf)
+            List<String> names = jf.versionedStream()
                     .map(JarEntry::getName)
                     .collect(Collectors.toList());
             return names.stream();
         }