--- old/src/java.base/share/classes/sun/misc/URLClassPath.java 2015-04-22 17:44:05.367423068 -0700 +++ new/src/java.base/share/classes/sun/misc/URLClassPath.java 2015-04-22 17:44:05.199423064 -0700 @@ -97,16 +97,16 @@ } /* The original search path of URLs. */ - private ArrayList path = new ArrayList(); + private ArrayList path = new ArrayList<>(); /* The stack of unopened URLs */ - Stack urls = new Stack(); + Stack urls = new Stack<>(); /* The resulting search path of Loaders */ - ArrayList loaders = new ArrayList(); + ArrayList loaders = new ArrayList<>(); /* Map of each URL opened to its corresponding Loader */ - HashMap lmap = new HashMap(); + HashMap lmap = new HashMap<>(); /* The jar protocol handler to use when creating new URLs */ private URLStreamHandler jarHandler; @@ -142,7 +142,7 @@ if (closed) { return Collections.emptyList(); } - List result = new LinkedList(); + List result = new LinkedList<>(); for (Loader loader : loaders) { try { loader.close(); @@ -234,7 +234,7 @@ */ public Enumeration findResources(final String name, final boolean check) { - return new Enumeration() { + return new Enumeration<>() { private int index = 0; private URL url = null; @@ -281,7 +281,7 @@ */ public Enumeration getResources(final String name, final boolean check) { - return new Enumeration() { + return new Enumeration<>() { private int index = 0; private Resource res = null; @@ -374,7 +374,7 @@ private Loader getLoader(final URL url) throws IOException { try { return java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public Loader run() throws IOException { String file = url.getFile(); if (file != null && file.endsWith("/")) { @@ -689,7 +689,7 @@ if (jar == null) { try { java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public Void run() throws IOException { if (DEBUG) { System.err.println("Opening " + csu); @@ -870,7 +870,7 @@ if (index == null) return null; - HashSet visited = new HashSet(); + HashSet visited = new HashSet<>(); return getResource(name, check, visited); } @@ -912,7 +912,7 @@ * before */ newLoader = AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public JarLoader run() throws IOException { return new JarLoader(url, handler, lmap);