equal
deleted
inserted
replaced
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 } |