jdk/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java
changeset 45004 ea3137042a61
parent 44359 c6761862ca0b
equal deleted inserted replaced
44789:73fd39e0702e 45004:ea3137042a61
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package jdk.internal.module;
    26 package jdk.internal.module;
    27 
    27 
       
    28 import java.io.File;
    28 import java.io.IOError;
    29 import java.io.IOError;
    29 import java.io.IOException;
    30 import java.io.IOException;
    30 import java.io.InputStream;
    31 import java.io.InputStream;
    31 import java.io.UncheckedIOException;
    32 import java.io.UncheckedIOException;
    32 import java.lang.module.ModuleReader;
    33 import java.lang.module.ModuleReader;
   224         private final JarFile jf;
   225         private final JarFile jf;
   225         private final URI uri;
   226         private final URI uri;
   226 
   227 
   227         static JarFile newJarFile(Path path) {
   228         static JarFile newJarFile(Path path) {
   228             try {
   229             try {
   229                 return new JarFile(path.toFile(),
   230                 return new JarFile(new File(path.toString()),
   230                                    true,               // verify
   231                                    true,                       // verify
   231                                    ZipFile.OPEN_READ,
   232                                    ZipFile.OPEN_READ,
   232                                    JarFile.runtimeVersion());
   233                                    JarFile.runtimeVersion());
   233             } catch (IOException ioe) {
   234             } catch (IOException ioe) {
   234                 throw new UncheckedIOException(ioe);
   235                 throw new UncheckedIOException(ioe);
   235             }
   236             }