< prev index next >

src/java.base/share/classes/jdk/internal/loader/URLClassPath.java

Print this page

        

*** 697,707 **** } /* * Nested class used to represent a Loader of resources from a JAR URL. */ ! static class JarLoader extends Loader { private JarFile jar; private final URL csu; private JarIndex index; private URLStreamHandler handler; private final HashMap<String, Loader> lmap; --- 697,707 ---- } /* * Nested class used to represent a Loader of resources from a JAR URL. */ ! private static class JarLoader extends Loader { private JarFile jar; private final URL csu; private JarIndex index; private URLStreamHandler handler; private final HashMap<String, Loader> lmap;
*** 712,722 **** /* * Creates a new JarLoader for the specified URL referring to * a JAR file. */ ! JarLoader(URL url, URLStreamHandler jarHandler, HashMap<String, Loader> loaderMap, AccessControlContext acc) throws IOException { super(new URL("jar", "", -1, url + "!/", jarHandler)); --- 712,722 ---- /* * Creates a new JarLoader for the specified URL referring to * a JAR file. */ ! private JarLoader(URL url, URLStreamHandler jarHandler, HashMap<String, Loader> loaderMap, AccessControlContext acc) throws IOException { super(new URL("jar", "", -1, url + "!/", jarHandler));
*** 1191,1205 **** */ private static class FileLoader extends Loader { /* Canonicalized File */ private File dir; ! FileLoader(URL url) throws IOException { super(url); - if (!"file".equals(url.getProtocol())) { - throw new IllegalArgumentException("url"); - } String path = url.getFile().replace('/', File.separatorChar); path = ParseUtil.decode(path); dir = (new File(path)).getCanonicalFile(); } --- 1191,1205 ---- */ private static class FileLoader extends Loader { /* Canonicalized File */ private File dir; ! /* ! * Creates a new FileLoader for the specified URL with a file protocol. ! */ ! private FileLoader(URL url) throws IOException { super(url); String path = url.getFile().replace('/', File.separatorChar); path = ParseUtil.decode(path); dir = (new File(path)).getCanonicalFile(); }
< prev index next >