--- old/src/java.base/linux/classes/sun/nio/ch/EPollPort.java 2015-04-22 17:43:35.195422369 -0700 +++ new/src/java.base/linux/classes/sun/nio/ch/EPollPort.java 2015-04-22 17:43:35.023422365 -0700 @@ -105,7 +105,7 @@ // create the queue and offer the special event to ensure that the first // threads polls - this.queue = new ArrayBlockingQueue(MAX_EPOLL_EVENTS); + this.queue = new ArrayBlockingQueue<>(MAX_EPOLL_EVENTS); this.queue.offer(NEED_TO_POLL); } --- old/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java 2015-04-22 17:43:35.639422380 -0700 +++ new/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java 2015-04-22 17:43:35.467422376 -0700 @@ -121,7 +121,7 @@ private static native void init(); static { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { System.loadLibrary("nio"); return null; --- old/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java 2015-04-22 17:43:36.083422390 -0700 +++ new/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java 2015-04-22 17:43:35.907422386 -0700 @@ -190,7 +190,7 @@ this.watcher = watcher; this.ifd = ifd; this.socketpair = sp; - this.wdToKey = new HashMap(); + this.wdToKey = new HashMap<>(); this.address = unsafe.allocateMemory(BUFFER_SIZE); } @@ -457,7 +457,7 @@ private static native int poll(int fd1, int fd2) throws UnixException; static { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { System.loadLibrary("nio"); return null; --- old/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java 2015-04-22 17:43:36.531422400 -0700 +++ new/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java 2015-04-22 17:43:36.355422396 -0700 @@ -68,7 +68,7 @@ private static native byte[] probe0(long pathAddress); static { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { System.loadLibrary("nio"); --- old/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java 2015-04-22 17:43:36.975422410 -0700 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java 2015-04-22 17:43:36.803422407 -0700 @@ -87,7 +87,7 @@ // If loading from stand alone build uncomment this. // System.loadLibrary("unpack"); java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("unpack"); return null; --- old/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java 2015-04-22 17:43:37.423422421 -0700 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java 2015-04-22 17:43:37.247422417 -0700 @@ -1210,7 +1210,7 @@ // This keeps files of similar format near each other. // Put class files at the end, keeping their fixed order. // Be sure the JAR file's required manifest stays at the front. (4893051) - Collections.sort(files, new Comparator() { + Collections.sort(files, new Comparator<>() { public int compare(File r0, File r1) { // Get the file name. String f0 = r0.nameString; --- old/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2015-04-22 17:43:37.895422432 -0700 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2015-04-22 17:43:37.715422428 -0700 @@ -1151,7 +1151,7 @@ return -1; } - Comparator entryOutputOrder = new Comparator() { + Comparator entryOutputOrder = new Comparator<>() { public int compare(Entry e0, Entry e1) { int k0 = getOutputIndex(e0); int k1 = getOutputIndex(e1); --- old/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java 2015-04-22 17:43:38.371422443 -0700 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java 2015-04-22 17:43:38.199422439 -0700 @@ -829,7 +829,7 @@ maxFlags = new int[ATTR_CONTEXT_LIMIT]; allLayouts = new FixedList<>(ATTR_CONTEXT_LIMIT); for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) { - allLayouts.set(i, new HashMap()); + allLayouts.set(i, new HashMap<>()); } // Collect maxFlags and allLayouts. for (Class cls : pkg.classes) { @@ -892,7 +892,7 @@ // Sort by count, most frequent first. // Predefs. participate in this sort, though it does not matter. Arrays.sort(layoutsAndCounts, - new Comparator>() { + new Comparator<>() { public int compare(Map.Entry e0, Map.Entry e1) { // Primary sort key is count, reversed. @@ -1010,7 +1010,7 @@ int numAttrDefs = defList.size(); Object[][] defs = new Object[numAttrDefs][]; defList.toArray(defs); - Arrays.sort(defs, new Comparator() { + Arrays.sort(defs, new Comparator<>() { public int compare(Object[] a0, Object[] a1) { // Primary sort key is attr def header. @SuppressWarnings("unchecked") --- old/src/java.base/share/classes/java/io/ExpiringCache.java 2015-04-22 17:43:38.835422454 -0700 +++ new/src/java.base/share/classes/java/io/ExpiringCache.java 2015-04-22 17:43:38.659422449 -0700 @@ -64,7 +64,7 @@ @SuppressWarnings("serial") ExpiringCache(long millisUntilExpiration) { this.millisUntilExpiration = millisUntilExpiration; - map = new LinkedHashMap() { + map = new LinkedHashMap<>() { protected boolean removeEldestEntry(Map.Entry eldest) { return size() > MAX_ENTRIES; } --- old/src/java.base/share/classes/java/io/FilePermission.java 2015-04-22 17:43:39.323422465 -0700 +++ new/src/java.base/share/classes/java/io/FilePermission.java 2015-04-22 17:43:39.135422461 -0700 @@ -201,7 +201,7 @@ } // store only the canonical cpath if possible - cpath = AccessController.doPrivileged(new PrivilegedAction() { + cpath = AccessController.doPrivileged(new PrivilegedAction<>() { public String run() { try { String path = cpath; --- old/src/java.base/share/classes/java/io/ObjectInputStream.java 2015-04-22 17:43:39.767422475 -0700 +++ new/src/java.base/share/classes/java/io/ObjectInputStream.java 2015-04-22 17:43:39.595422471 -0700 @@ -1263,7 +1263,7 @@ */ private static boolean auditSubclass(final Class subcl) { Boolean result = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Boolean run() { for (Class cl = subcl; cl != ObjectInputStream.class; @@ -2255,7 +2255,7 @@ try { while (list != null) { AccessController.doPrivileged( - new PrivilegedExceptionAction() + new PrivilegedExceptionAction<>() { public Void run() throws InvalidObjectException { list.obj.validateObject(); --- old/src/java.base/share/classes/java/io/ObjectOutputStream.java 2015-04-22 17:43:40.239422486 -0700 +++ new/src/java.base/share/classes/java/io/ObjectOutputStream.java 2015-04-22 17:43:40.071422482 -0700 @@ -1066,7 +1066,7 @@ */ private static boolean auditSubclass(final Class subcl) { Boolean result = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Boolean run() { for (Class cl = subcl; cl != ObjectOutputStream.class; --- old/src/java.base/share/classes/java/io/ObjectStreamClass.java 2015-04-22 17:43:40.707422497 -0700 +++ new/src/java.base/share/classes/java/io/ObjectStreamClass.java 2015-04-22 17:43:40.535422493 -0700 @@ -367,7 +367,7 @@ entry = th; } if (future.set(entry)) { - Caches.localDescs.put(key, new SoftReference(entry)); + Caches.localDescs.put(key, new SoftReference<>(entry)); } else { // nested lookup call already set future entry = future.get(); @@ -430,7 +430,7 @@ } if (interrupted) { AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Void run() { Thread.currentThread().interrupt(); return null; @@ -465,7 +465,7 @@ localDesc = this; if (serializable) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { if (isEnum) { suid = Long.valueOf(0); @@ -1733,7 +1733,7 @@ for (int i = 0; i < fields.length; i++) { fieldSigs[i] = new MemberSignature(fields[i]); } - Arrays.sort(fieldSigs, new Comparator() { + Arrays.sort(fieldSigs, new Comparator<>() { public int compare(MemberSignature ms1, MemberSignature ms2) { return ms1.name.compareTo(ms2.name); } @@ -1764,7 +1764,7 @@ for (int i = 0; i < cons.length; i++) { consSigs[i] = new MemberSignature(cons[i]); } - Arrays.sort(consSigs, new Comparator() { + Arrays.sort(consSigs, new Comparator<>() { public int compare(MemberSignature ms1, MemberSignature ms2) { return ms1.signature.compareTo(ms2.signature); } @@ -1787,7 +1787,7 @@ for (int i = 0; i < methods.length; i++) { methSigs[i] = new MemberSignature(methods[i]); } - Arrays.sort(methSigs, new Comparator() { + Arrays.sort(methSigs, new Comparator<>() { public int compare(MemberSignature ms1, MemberSignature ms2) { int comp = ms1.name.compareTo(ms2.name); if (comp == 0) { @@ -2164,7 +2164,7 @@ entry = th; } future.set(entry); - Caches.reflectors.put(key, new SoftReference(entry)); + Caches.reflectors.put(key, new SoftReference<>(entry)); } if (entry instanceof FieldReflector) { --- old/src/java.base/share/classes/java/lang/CharacterName.java 2015-04-22 17:43:41.171422508 -0700 +++ new/src/java.base/share/classes/java/lang/CharacterName.java 2015-04-22 17:43:40.999422504 -0700 @@ -45,7 +45,7 @@ DataInputStream dis = null; try { dis = new DataInputStream(new InflaterInputStream( - AccessController.doPrivileged(new PrivilegedAction() + AccessController.doPrivileged(new PrivilegedAction<>() { public InputStream run() { return getClass().getResourceAsStream("uniName.dat"); --- old/src/java.base/share/classes/java/lang/Class.java 2015-04-22 17:43:41.603422518 -0700 +++ new/src/java.base/share/classes/java/lang/Class.java 2015-04-22 17:43:41.427422514 -0700 @@ -437,7 +437,7 @@ // (the stack depth is wrong for the Constructor's // security check to work) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { c.setAccessible(true); return null; @@ -1068,7 +1068,7 @@ Reflection.getCallerClass(), true); // Client is ok to access declared methods but j.l.Class might not be. Method[] candidates = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { @Override public Method[] run() { return enclosingCandidate.getDeclaredMethods(); @@ -1228,7 +1228,7 @@ Reflection.getCallerClass(), true); // Client is ok to access declared methods but j.l.Class might not be. Constructor[] candidates = AccessController.doPrivileged( - new PrivilegedAction[]>() { + new PrivilegedAction<>() { @Override public Constructor[] run() { return enclosingCandidate.getDeclaredConstructors(); @@ -1542,7 +1542,7 @@ // has already been ok'd by the SecurityManager. return java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction[]>() { + new java.security.PrivilegedAction<>() { public Class[] run() { List> list = new ArrayList<>(); Class currentClass = Class.this; @@ -3293,7 +3293,7 @@ private static boolean initted = false; private static void checkInitted() { if (initted) return; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { // Tests to ensure the system properties table is fully // initialized. This is needed because reflection code is @@ -3349,7 +3349,7 @@ try { final Method values = getMethod("values"); java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { values.setAccessible(true); return null; --- old/src/java.base/share/classes/java/lang/ClassLoader.java 2015-04-22 17:43:42.083422529 -0700 +++ new/src/java.base/share/classes/java/lang/ClassLoader.java 2015-04-22 17:43:41.915422525 -0700 @@ -496,7 +496,7 @@ final String name = cls.getName(); final int i = name.lastIndexOf('.'); if (i != -1) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { sm.checkPackageAccess(name.substring(0, i)); return null; @@ -1265,7 +1265,7 @@ { final Enumeration e = getBootstrapClassPath().getResources(name); - return new Enumeration () { + return new Enumeration<> () { public URL nextElement() { return e.nextElement().getURL(); } @@ -1867,7 +1867,7 @@ boolean isBuiltin = (name != null); if (!isBuiltin) { name = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public String run() { try { return file.exists() ? file.getCanonicalPath() : null; --- old/src/java.base/share/classes/java/lang/Package.java 2015-04-22 17:43:42.559422540 -0700 +++ new/src/java.base/share/classes/java/lang/Package.java 2015-04-22 17:43:42.371422535 -0700 @@ -595,7 +595,7 @@ CachedManifest(final String fileName) { this.fileName = fileName; - this.url = AccessController.doPrivileged(new PrivilegedAction() { + this.url = AccessController.doPrivileged(new PrivilegedAction<>() { public URL run() { final File file = new File(fileName); if (file.isFile()) { @@ -626,7 +626,7 @@ if (m != null) { return m; } - m = AccessController.doPrivileged(new PrivilegedAction() { + m = AccessController.doPrivileged(new PrivilegedAction<>() { public Manifest run() { try (FileInputStream fis = new FileInputStream(fileName); JarInputStream jis = new JarInputStream(fis, false)) { --- old/src/java.base/share/classes/java/lang/SecurityManager.java 2015-04-22 17:43:43.003422550 -0700 +++ new/src/java.base/share/classes/java/lang/SecurityManager.java 2015-04-22 17:43:42.835422546 -0700 @@ -1455,7 +1455,7 @@ if (!packageAccessValid) { String tmpPropertyStr = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public String run() { return java.security.Security.getProperty( "package.access"); @@ -1524,7 +1524,7 @@ if (!packageDefinitionValid) { String tmpPropertyStr = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public String run() { return java.security.Security.getProperty( "package.definition"); --- old/src/java.base/share/classes/java/lang/System.java 2015-04-22 17:43:43.447422560 -0700 +++ new/src/java.base/share/classes/java/lang/System.java 2015-04-22 17:43:43.279422556 -0700 @@ -309,7 +309,7 @@ // calls the installed security manager's checkPermission method // which will loop infinitely if there is a non-system class // (in this case: the new security manager class) on the stack). - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Object run() { s.getClass().getProtectionDomain().implies (SecurityConstants.ALL_PERMISSION); --- old/src/java.base/share/classes/java/lang/Thread.java 2015-04-22 17:43:43.907422571 -0700 +++ new/src/java.base/share/classes/java/lang/Thread.java 2015-04-22 17:43:43.731422567 -0700 @@ -1661,7 +1661,7 @@ */ private static boolean auditSubclass(final Class subcl) { Boolean result = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Boolean run() { for (Class cl = subcl; cl != Thread.class; --- old/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java 2015-04-22 17:43:44.359422581 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java 2015-04-22 17:43:44.191422578 -0700 @@ -87,7 +87,7 @@ // For more information see comments on {@link MethodHandleNatives#linkMethod}. throw new IllegalArgumentException("cannot reflect signature polymorphic method"); } - Member mem = AccessController.doPrivileged(new PrivilegedAction() { + Member mem = AccessController.doPrivileged(new PrivilegedAction<>() { public Member run() { try { return reflectUnchecked(); --- old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java 2015-04-22 17:43:44.795422592 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java 2015-04-22 17:43:44.627422588 -0700 @@ -194,7 +194,7 @@ final Class innerClass = spinInnerClass(); if (invokedType.parameterCount() == 0) { final Constructor[] ctrs = AccessController.doPrivileged( - new PrivilegedAction[]>() { + new PrivilegedAction<>() { @Override public Constructor[] run() { Constructor[] ctrs = innerClass.getDeclaredConstructors(); @@ -311,7 +311,7 @@ // If requested, dump out to a file for debugging purposes if (dumper != null) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { dumper.dumpClass(lambdaClassName, classBytes); --- old/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2015-04-22 17:43:45.231422602 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2015-04-22 17:43:45.063422598 -0700 @@ -167,7 +167,7 @@ static void maybeDump(final String className, final byte[] classFile) { if (DUMP_CLASS_FILES) { java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { try { String dumpName = className; --- old/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java 2015-04-22 17:43:45.679422612 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java 2015-04-22 17:43:45.503422608 -0700 @@ -51,7 +51,7 @@ private static final int MAX_ARITY; static { final Object[] values = { 255 }; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { values[0] = Integer.getInteger(MethodHandleImpl.class.getName()+".MAX_ARITY", 255); @@ -1234,7 +1234,7 @@ private static final byte[] T_BYTES; static { final Object[] values = {null}; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { try { Class tClass = T.class; --- old/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java 2015-04-22 17:43:46.127422622 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java 2015-04-22 17:43:45.959422618 -0700 @@ -199,7 +199,7 @@ // sun.invoke.WrapperInstance is a restricted interface not accessible // by any non-null class loader. final ClassLoader loader = proxyLoader; - proxy = AccessController.doPrivileged(new PrivilegedAction() { + proxy = AccessController.doPrivileged(new PrivilegedAction<>() { public Object run() { return Proxy.newProxyInstance( loader, --- old/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java 2015-04-22 17:43:46.559422632 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java 2015-04-22 17:43:46.391422628 -0700 @@ -53,7 +53,7 @@ static { final Object[] values = new Object[9]; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { values[0] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DEBUG_NAMES"); values[1] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DUMP_CLASS_FILES"); --- old/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java 2015-04-22 17:43:46.991422642 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java 2015-04-22 17:43:46.823422639 -0700 @@ -64,7 +64,7 @@ try { path = path.trim(); final Path dir = Paths.get(path.length() == 0 ? "." : path); - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { validateDumpDir(dir); --- old/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java 2015-04-22 17:43:47.427422652 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java 2015-04-22 17:43:47.251422648 -0700 @@ -218,7 +218,7 @@ private Object readResolve() throws ReflectiveOperationException { try { - Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction() { + Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<>() { @Override public Method run() throws Exception { Method m = capturingClass.getDeclaredMethod("$deserializeLambda$", SerializedLambda.class); --- old/src/java.base/share/classes/java/lang/ref/Finalizer.java 2015-04-22 17:43:47.911422664 -0700 +++ new/src/java.base/share/classes/java/lang/ref/Finalizer.java 2015-04-22 17:43:47.727422659 -0700 @@ -121,7 +121,7 @@ */ private static void forkSecondaryFinalizer(final Runnable proc) { AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Void run() { ThreadGroup tg = Thread.currentThread().getThreadGroup(); for (ThreadGroup tgn = tg; --- old/src/java.base/share/classes/java/lang/reflect/Proxy.java 2015-04-22 17:43:48.343422674 -0700 +++ new/src/java.base/share/classes/java/lang/reflect/Proxy.java 2015-04-22 17:43:48.171422670 -0700 @@ -728,7 +728,7 @@ final Constructor cons = cl.getConstructor(constructorParams); if (!Modifier.isPublic(cl.getModifiers())) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { cons.setAccessible(true); return null; --- old/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2015-04-22 17:43:48.795422684 -0700 +++ new/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2015-04-22 17:43:48.623422680 -0700 @@ -62,7 +62,7 @@ */ static { java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("net"); return null; --- old/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java 2015-04-22 17:43:49.227422694 -0700 +++ new/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java 2015-04-22 17:43:49.059422690 -0700 @@ -79,7 +79,7 @@ */ static { java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("net"); return null; --- old/src/java.base/share/classes/java/net/CookieManager.java 2015-04-22 17:43:49.703422705 -0700 +++ new/src/java.base/share/classes/java/net/CookieManager.java 2015-04-22 17:43:49.527422701 -0700 @@ -201,14 +201,13 @@ throw new IllegalArgumentException("Argument is null"); } - Map> cookieMap = - new java.util.HashMap>(); + Map> cookieMap = new java.util.HashMap<>(); // if there's no default CookieStore, no way for us to get any cookie if (cookieJar == null) return Collections.unmodifiableMap(cookieMap); boolean secureLink = "https".equalsIgnoreCase(uri.getScheme()); - List cookies = new java.util.ArrayList(); + List cookies = new java.util.ArrayList<>(); String path = uri.getPath(); if (path == null || path.isEmpty()) { path = "/"; @@ -411,7 +410,7 @@ private List sortByPath(List cookies) { Collections.sort(cookies, new CookiePathComparator()); - List cookieHeader = new java.util.ArrayList(); + List cookieHeader = new java.util.ArrayList<>(); for (HttpCookie cookie : cookies) { // Netscape cookie spec and RFC 2965 have different format of Cookie // header; RFC 2965 requires a leading $Version="1" string while Netscape --- old/src/java.base/share/classes/java/net/DatagramPacket.java 2015-04-22 17:43:50.139422715 -0700 +++ new/src/java.base/share/classes/java/net/DatagramPacket.java 2015-04-22 17:43:49.971422711 -0700 @@ -47,7 +47,7 @@ */ static { java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("net"); return null; --- old/src/java.base/share/classes/java/net/DatagramSocket.java 2015-04-22 17:43:50.579422725 -0700 +++ new/src/java.base/share/classes/java/net/DatagramSocket.java 2015-04-22 17:43:50.399422721 -0700 @@ -308,7 +308,7 @@ // getDeclaredMethod, therefore we need permission to access the member try { AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public Void run() throws NoSuchMethodException { Class[] cl = new Class[1]; cl[0] = DatagramPacket.class; --- old/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java 2015-04-22 17:43:51.027422736 -0700 +++ new/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java 2015-04-22 17:43:50.859422732 -0700 @@ -64,7 +64,7 @@ serverSocketField = netClientClazz.getDeclaredField("serverSocket"); java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { httpField.setAccessible(true); serverSocketField.setAccessible(true); @@ -146,7 +146,7 @@ { try { return java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public Socket run() throws IOException { return doTunnel(urlString, timeout); } --- old/src/java.base/share/classes/java/net/HttpCookie.java 2015-04-22 17:43:51.459422746 -0700 +++ new/src/java.base/share/classes/java/net/HttpCookie.java 2015-04-22 17:43:51.291422742 -0700 @@ -1125,7 +1125,7 @@ * @return list of strings; never null */ private static List splitMultiCookies(String header) { - List cookies = new java.util.ArrayList(); + List cookies = new java.util.ArrayList<>(); int quoteCount = 0; int p, q; --- old/src/java.base/share/classes/java/net/IDN.java 2015-04-22 17:43:51.907422756 -0700 +++ new/src/java.base/share/classes/java/net/IDN.java 2015-04-22 17:43:51.735422752 -0700 @@ -228,7 +228,7 @@ try { final String IDN_PROFILE = "uidna.spp"; if (System.getSecurityManager() != null) { - stream = AccessController.doPrivileged(new PrivilegedAction() { + stream = AccessController.doPrivileged(new PrivilegedAction<>() { public InputStream run() { return StringPrep.class.getResourceAsStream(IDN_PROFILE); } --- old/src/java.base/share/classes/java/net/InMemoryCookieStore.java 2015-04-22 17:43:52.339422766 -0700 +++ new/src/java.base/share/classes/java/net/InMemoryCookieStore.java 2015-04-22 17:43:52.171422762 -0700 @@ -62,9 +62,9 @@ * The default ctor */ public InMemoryCookieStore() { - cookieJar = new ArrayList(); - domainIndex = new HashMap>(); - uriIndex = new HashMap>(); + cookieJar = new ArrayList<>(); + domainIndex = new HashMap<>(); + uriIndex = new HashMap<>(); lock = new ReentrantLock(false); } @@ -115,7 +115,7 @@ throw new NullPointerException("uri is null"); } - List cookies = new ArrayList(); + List cookies = new ArrayList<>(); boolean secureLink = "https".equalsIgnoreCase(uri.getScheme()); lock.lock(); try { @@ -157,7 +157,7 @@ * of this cookie store. */ public List getURIs() { - List uris = new ArrayList(); + List uris = new ArrayList<>(); lock.lock(); try { @@ -281,7 +281,7 @@ String host, boolean secureLink) { // Use a separate list to handle cookies that need to be removed so // that there is no conflict with iterators. - ArrayList toRemove = new ArrayList(); + ArrayList toRemove = new ArrayList<>(); for (Map.Entry> entry : cookieIndex.entrySet()) { String domain = entry.getKey(); List lst = entry.getValue(); @@ -368,7 +368,7 @@ cookies.add(cookie); } else { - cookies = new ArrayList(); + cookies = new ArrayList<>(); cookies.add(cookie); indexStore.put(index, cookies); } --- old/src/java.base/share/classes/java/net/InetAddress.java 2015-04-22 17:43:52.795422777 -0700 +++ new/src/java.base/share/classes/java/net/InetAddress.java 2015-04-22 17:43:52.603422772 -0700 @@ -270,7 +270,7 @@ preferIPv6Address = java.security.AccessController.doPrivileged( new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue(); AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("net"); return null; @@ -852,7 +852,7 @@ final String providerName = provider; try { nameService = java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public NameService run() { Iterator itr = ServiceLoader.load(NameServiceDescriptor.class) @@ -892,7 +892,7 @@ String provider = null;; String propPrefix = "sun.net.spi.nameservice.provider."; int n = 1; - nameServices = new ArrayList(); + nameServices = new ArrayList<>(); provider = AccessController.doPrivileged( new GetPropertyAction(propPrefix + n)); while (provider != null) { --- old/src/java.base/share/classes/java/net/NetworkInterface.java 2015-04-22 17:43:53.255422787 -0700 +++ new/src/java.base/share/classes/java/net/NetworkInterface.java 2015-04-22 17:43:53.083422783 -0700 @@ -54,7 +54,7 @@ static { AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("net"); return null; @@ -167,7 +167,7 @@ * @since 1.6 */ public java.util.List getInterfaceAddresses() { - java.util.List lst = new java.util.ArrayList(1); + java.util.List lst = new java.util.ArrayList<>(1); SecurityManager sec = System.getSecurityManager(); for (int j=0; j() { + return new Enumeration<>() { private int i = 0; public NetworkInterface nextElement() { if (netifs != null && i < netifs.length) { --- old/src/java.base/share/classes/java/net/Socket.java 2015-04-22 17:43:53.695422798 -0700 +++ new/src/java.base/share/classes/java/net/Socket.java 2015-04-22 17:43:53.519422794 -0700 @@ -470,7 +470,7 @@ // getDeclaredMethod, therefore we need permission to access the member oldImpl = AccessController.doPrivileged - (new PrivilegedAction() { + (new PrivilegedAction<>() { public Boolean run() { Class clazz = impl.getClass(); while (true) { @@ -911,7 +911,7 @@ InputStream is = null; try { is = AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public InputStream run() throws IOException { return impl.getInputStream(); } @@ -951,7 +951,7 @@ OutputStream os = null; try { os = AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public OutputStream run() throws IOException { return impl.getOutputStream(); } --- old/src/java.base/share/classes/java/net/SocketPermission.java 2015-04-22 17:43:54.147422808 -0700 +++ new/src/java.base/share/classes/java/net/SocketPermission.java 2015-04-22 17:43:53.979422804 -0700 @@ -1194,7 +1194,7 @@ */ private static int initEphemeralPorts(String suffix, int defval) { return AccessController.doPrivileged( - new PrivilegedAction(){ + new PrivilegedAction<>(){ public Integer run() { int val = Integer.getInteger( "jdk.net.ephemeralPortRange."+suffix, -1 @@ -1328,7 +1328,7 @@ */ public SocketPermissionCollection() { - perms = new ArrayList(); + perms = new ArrayList<>(); } /** @@ -1466,7 +1466,7 @@ // Get the one we want @SuppressWarnings("unchecked") Vector permissions = (Vector)gfields.get("permissions", null); - perms = new ArrayList(permissions.size()); + perms = new ArrayList<>(permissions.size()); perms.addAll(permissions); } } --- old/src/java.base/share/classes/java/net/SocksSocketImpl.java 2015-04-22 17:43:54.599422819 -0700 +++ new/src/java.base/share/classes/java/net/SocksSocketImpl.java 2015-04-22 17:43:54.427422815 -0700 @@ -82,7 +82,7 @@ { try { AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public Void run() throws IOException { superConnectServer(host, port, timeout); cmdIn = getInputStream(); @@ -157,7 +157,7 @@ final InetAddress addr = InetAddress.getByName(server); PasswordAuthentication pw = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public PasswordAuthentication run() { return Authenticator.requestPasswordAuthentication( server, addr, serverPort, "SOCKS5", "SOCKS authentication", null); @@ -351,7 +351,7 @@ // server is not null only when the socket was created with a // specified proxy in which case it does bypass the ProxySelector ProxySelector sel = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public ProxySelector run() { return ProxySelector.getDefault(); } @@ -595,7 +595,7 @@ InetAddress naddr = baddr; if (naddr.isAnyLocalAddress()) { naddr = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public InetAddress run() { return cmdsock.getLocalAddress(); @@ -671,7 +671,7 @@ // server is not null only when the socket was created with a // specified proxy in which case it does bypass the ProxySelector ProxySelector sel = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public ProxySelector run() { return ProxySelector.getDefault(); } @@ -724,7 +724,7 @@ // Connects to the SOCKS server try { AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public Void run() throws Exception { cmdsock = new Socket(new PlainSocketImpl()); cmdsock.connect(new InetSocketAddress(server, serverPort)); @@ -755,7 +755,7 @@ } else { try { AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public Void run() throws Exception { cmdsock = new Socket(new PlainSocketImpl()); cmdsock.connect(new InetSocketAddress(server, serverPort)); --- old/src/java.base/share/classes/java/net/URL.java 2015-04-22 17:43:55.055422829 -0700 +++ new/src/java.base/share/classes/java/net/URL.java 2015-04-22 17:43:54.883422825 -0700 @@ -1158,7 +1158,7 @@ private static URLStreamHandler lookupViaProperty(String protocol) { String packagePrefixList = java.security.AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public String run() { return System.getProperty(protocolPathProp, ""); } @@ -1190,7 +1190,7 @@ } private static Iterator providers() { - return new Iterator() { + return new Iterator<>() { ClassLoader cl = ClassLoader.getSystemClassLoader(); ServiceLoader sl = @@ -1243,7 +1243,7 @@ gate.set(gate); try { return AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public URLStreamHandler run() { Iterator itr = providers(); while (itr.hasNext()) { --- old/src/java.base/share/classes/java/net/URLClassLoader.java 2015-04-22 17:43:55.503422839 -0700 +++ new/src/java.base/share/classes/java/net/URLClassLoader.java 2015-04-22 17:43:55.331422835 -0700 @@ -359,7 +359,7 @@ final Class result; try { result = AccessController.doPrivileged( - new PrivilegedExceptionAction>() { + new PrivilegedExceptionAction<>() { public Class run() throws ClassNotFoundException { String path = name.replace('.', '/').concat(".class"); Resource res = ucp.getResource(path, false); @@ -564,7 +564,7 @@ * The same restriction to finding classes applies to resources */ URL url = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public URL run() { return ucp.findResource(name, true); } @@ -587,7 +587,7 @@ { final Enumeration e = ucp.findResources(name, true); - return new Enumeration() { + return new Enumeration<>() { private URL url = null; private boolean next() { @@ -596,7 +596,7 @@ } do { URL u = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public URL run() { if (!e.hasMoreElements()) return null; @@ -704,7 +704,7 @@ final SecurityManager sm = System.getSecurityManager(); if (sm != null) { final Permission fp = p; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() throws SecurityException { sm.checkPermission(fp); return null; @@ -735,7 +735,7 @@ final AccessControlContext acc = AccessController.getContext(); // Need a privileged block to create the class loader URLClassLoader ucl = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public URLClassLoader run() { return new FactoryURLClassLoader(urls, parent, acc); } @@ -760,7 +760,7 @@ final AccessControlContext acc = AccessController.getContext(); // Need a privileged block to create the class loader URLClassLoader ucl = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public URLClassLoader run() { return new FactoryURLClassLoader(urls, acc); } --- old/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java 2015-04-22 17:43:55.947422850 -0700 +++ new/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java 2015-04-22 17:43:55.779422846 -0700 @@ -296,7 +296,7 @@ public static AsynchronousFileChannel open(Path file, OpenOption... options) throws IOException { - Set set = new HashSet(options.length); + Set set = new HashSet<>(options.length); Collections.addAll(set, options); return open(file, set, null, NO_ATTRIBUTES); } --- old/src/java.base/share/classes/java/nio/channels/FileChannel.java 2015-04-22 17:43:56.383422860 -0700 +++ new/src/java.base/share/classes/java/nio/channels/FileChannel.java 2015-04-22 17:43:56.219422856 -0700 @@ -330,7 +330,7 @@ public static FileChannel open(Path path, OpenOption... options) throws IOException { - Set set = new HashSet(options.length); + Set set = new HashSet<>(options.length); Collections.addAll(set, options); return open(path, set, NO_ATTRIBUTES); } --- old/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java 2015-04-22 17:43:56.831422870 -0700 +++ new/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java 2015-04-22 17:43:56.655422866 -0700 @@ -76,7 +76,7 @@ private static AsynchronousChannelProvider load() { return AccessController - .doPrivileged(new PrivilegedAction() { + .doPrivileged(new PrivilegedAction<>() { public AsynchronousChannelProvider run() { AsynchronousChannelProvider p; p = loadProviderFromProperty(); --- old/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java 2015-04-22 17:43:57.263422880 -0700 +++ new/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java 2015-04-22 17:43:57.091422876 -0700 @@ -172,7 +172,7 @@ if (provider != null) return provider; return AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public SelectorProvider run() { if (loadProviderFromProperty()) return provider; --- old/src/java.base/share/classes/java/nio/charset/Charset.java 2015-04-22 17:43:57.687422890 -0700 +++ new/src/java.base/share/classes/java/nio/charset/Charset.java 2015-04-22 17:43:57.523422886 -0700 @@ -335,7 +335,7 @@ // thrown. Should be invoked with full privileges. // private static Iterator providers() { - return new Iterator() { + return new Iterator<>() { ClassLoader cl = ClassLoader.getSystemClassLoader(); ServiceLoader sl = @@ -404,7 +404,7 @@ gate.set(gate); return AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Charset run() { for (Iterator i = providers(); i.hasNext();) { @@ -428,7 +428,7 @@ // returns ExtendedProvider, if installed private static CharsetProvider extendedProvider() { return AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public CharsetProvider run() { try { Class epc @@ -570,10 +570,10 @@ */ public static SortedMap availableCharsets() { return AccessController.doPrivileged( - new PrivilegedAction>() { + new PrivilegedAction<>() { public SortedMap run() { TreeMap m = - new TreeMap( + new TreeMap<>( ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); put(standardProvider.charsets(), m); CharsetProvider ecp = ExtendedProviderHolder.extendedProvider; @@ -663,7 +663,7 @@ if (aliasSet != null) return aliasSet; int n = aliases.length; - HashSet hs = new HashSet(n); + HashSet hs = new HashSet<>(n); for (int i = 0; i < n; i++) hs.add(aliases[i]); aliasSet = Collections.unmodifiableSet(hs); --- old/src/java.base/share/classes/java/nio/charset/CoderResult.java 2015-04-22 17:43:58.143422901 -0700 +++ new/src/java.base/share/classes/java/nio/charset/CoderResult.java 2015-04-22 17:43:57.975422897 -0700 @@ -204,13 +204,13 @@ WeakReference w; CoderResult e = null; if (cache == null) { - cache = new HashMap>(); + cache = new HashMap<>(); } else if ((w = cache.get(k)) != null) { e = w.get(); } if (e == null) { e = create(len); - cache.put(k, new WeakReference(e)); + cache.put(k, new WeakReference<>(e)); } return e; } --- old/src/java.base/share/classes/java/nio/file/FileSystems.java 2015-04-22 17:43:58.579422911 -0700 +++ new/src/java.base/share/classes/java/nio/file/FileSystems.java 2015-04-22 17:43:58.407422907 -0700 @@ -93,7 +93,7 @@ private static FileSystem defaultFileSystem() { // load default provider FileSystemProvider provider = AccessController - .doPrivileged(new PrivilegedAction() { + .doPrivileged(new PrivilegedAction<>() { public FileSystemProvider run() { return getDefaultProvider(); } --- old/src/java.base/share/classes/java/nio/file/Files.java 2015-04-22 17:43:59.039422921 -0700 +++ new/src/java.base/share/classes/java/nio/file/Files.java 2015-04-22 17:43:58.867422917 -0700 @@ -402,7 +402,7 @@ public static SeekableByteChannel newByteChannel(Path path, OpenOption... options) throws IOException { - Set set = new HashSet(options.length); + Set set = new HashSet<>(options.length); Collections.addAll(set, options); return newByteChannel(path, set); } @@ -516,7 +516,7 @@ // create a matcher and return a filter that uses it. FileSystem fs = dir.getFileSystem(); final PathMatcher matcher = fs.getPathMatcher("glob:" + glob); - DirectoryStream.Filter filter = new DirectoryStream.Filter() { + DirectoryStream.Filter filter = new DirectoryStream.Filter<>() { @Override public boolean accept(Path entry) { return matcher.matches(entry.getFileName()); @@ -1541,7 +1541,7 @@ // creates the default file type detector private static FileTypeDetector createDefaultFileTypeDetector() { return AccessController - .doPrivileged(new PrivilegedAction() { + .doPrivileged(new PrivilegedAction<>() { @Override public FileTypeDetector run() { return sun.nio.fs.DefaultFileTypeDetector.create(); }}); @@ -1550,7 +1550,7 @@ // loads all installed file type detectors private static List loadInstalledDetectors() { return AccessController - .doPrivileged(new PrivilegedAction>() { + .doPrivileged(new PrivilegedAction<>() { @Override public List run() { List list = new ArrayList<>(); ServiceLoader loader = ServiceLoader @@ -3468,7 +3468,7 @@ final Iterator delegate = ds.iterator(); // Re-wrap DirectoryIteratorException to UncheckedIOException - Iterator iterator = new Iterator() { + Iterator iterator = new Iterator<>() { @Override public boolean hasNext() { try { --- old/src/java.base/share/classes/java/nio/file/Path.java 2015-04-22 17:43:59.527422933 -0700 +++ new/src/java.base/share/classes/java/nio/file/Path.java 2015-04-22 17:43:59.355422929 -0700 @@ -801,7 +801,7 @@ */ @Override default Iterator iterator() { - return new Iterator() { + return new Iterator<>() { private int i = 0; @Override --- old/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java 2015-04-22 17:44:00.019422944 -0700 +++ new/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java 2015-04-22 17:43:59.839422940 -0700 @@ -306,7 +306,7 @@ * @return the permissions component */ public Set permissions() { - return new HashSet(perms); + return new HashSet<>(perms); } /** @@ -317,7 +317,7 @@ * @return the flags component */ public Set flags() { - return new HashSet(flags); + return new HashSet<>(flags); } /** --- old/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java 2015-04-22 17:44:00.455422954 -0700 +++ new/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java 2015-04-22 17:44:00.287422950 -0700 @@ -160,13 +160,13 @@ { // copy set and check for nulls (CCE will be thrown if an element is not // a PosixFilePermission) - perms = new HashSet(perms); + perms = new HashSet<>(perms); for (PosixFilePermission p: perms) { if (p == null) throw new NullPointerException(); } final Set value = perms; - return new FileAttribute>() { + return new FileAttribute<>() { @Override public String name() { return "posix:permissions"; --- old/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java 2015-04-22 17:44:00.895422964 -0700 +++ new/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java 2015-04-22 17:44:00.719422960 -0700 @@ -110,7 +110,7 @@ // loads all installed providers private static List loadInstalledProviders() { - List list = new ArrayList(); + List list = new ArrayList<>(); ServiceLoader sl = ServiceLoader .load(FileSystemProvider.class, ClassLoader.getSystemClassLoader()); @@ -163,7 +163,7 @@ loadingProviders = true; List list = AccessController - .doPrivileged(new PrivilegedAction>() { + .doPrivileged(new PrivilegedAction<>() { @Override public List run() { return loadInstalledProviders(); @@ -419,7 +419,7 @@ throws IOException { int len = options.length; - Set opts = new HashSet(len + 3); + Set opts = new HashSet<>(len + 3); if (len == 0) { opts.add(StandardOpenOption.CREATE); opts.add(StandardOpenOption.TRUNCATE_EXISTING); --- old/src/java.base/share/classes/java/time/format/DateTimeParseContext.java 2015-04-22 17:44:01.371422975 -0700 +++ new/src/java.base/share/classes/java/time/format/DateTimeParseContext.java 2015-04-22 17:44:01.203422971 -0700 @@ -399,7 +399,7 @@ */ void addChronoChangedListener(Consumer listener) { if (chronoListeners == null) { - chronoListeners = new ArrayList>(); + chronoListeners = new ArrayList<>(); } chronoListeners.add(listener); } --- old/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java 2015-04-22 17:44:01.807422985 -0700 +++ new/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java 2015-04-22 17:44:01.631422981 -0700 @@ -141,7 +141,7 @@ // if the property java.time.zone.DefaultZoneRulesProvider is // set then its value is the class name of the default provider final List loaded = new ArrayList<>(); - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Object run() { String prop = System.getProperty("java.time.zone.DefaultZoneRulesProvider"); if (prop != null) { --- old/src/java.base/share/classes/java/util/Calendar.java 2015-04-22 17:44:02.235422995 -0700 +++ new/src/java.base/share/classes/java/util/Calendar.java 2015-04-22 17:44:02.067422991 -0700 @@ -3579,7 +3579,7 @@ ZoneInfo zi = null; try { zi = AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { @Override public ZoneInfo run() throws Exception { return (ZoneInfo) input.readObject(); --- old/src/java.base/share/classes/java/util/Currency.java 2015-04-22 17:44:02.707423006 -0700 +++ new/src/java.base/share/classes/java/util/Currency.java 2015-04-22 17:44:02.539423002 -0700 @@ -212,7 +212,7 @@ private static final int VALID_FORMAT_VERSION = 2; static { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { try { --- old/src/java.base/share/classes/java/util/ResourceBundle.java 2015-04-22 17:44:03.159423017 -0700 +++ new/src/java.base/share/classes/java/util/ResourceBundle.java 2015-04-22 17:44:02.987423013 -0700 @@ -2655,7 +2655,7 @@ InputStream stream = null; try { stream = AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public InputStream run() throws IOException { InputStream is = null; if (reloadFlag) { --- old/src/java.base/share/classes/java/util/TimeZone.java 2015-04-22 17:44:03.623423027 -0700 +++ new/src/java.base/share/classes/java/util/TimeZone.java 2015-04-22 17:44:03.455423024 -0700 @@ -678,7 +678,7 @@ assert tz != null; final String id = zoneID; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { System.setProperty("user.timezone", id); --- old/src/java.base/share/classes/java/util/jar/JarFile.java 2015-04-22 17:44:04.071423038 -0700 +++ new/src/java.base/share/classes/java/util/jar/JarFile.java 2015-04-22 17:44:03.899423034 -0700 @@ -593,7 +593,7 @@ if (includeUnsigned) { return unsignedEntryNames(); } else { - return new Enumeration() { + return new Enumeration<>() { public boolean hasMoreElements() { return false; @@ -619,7 +619,7 @@ // screen out entries which are never signed final Enumeration enum_ = super.entries(); - return new Enumeration() { + return new Enumeration<>() { ZipEntry entry; @@ -669,7 +669,7 @@ private Enumeration unsignedEntryNames() { final Enumeration entries = entries(); - return new Enumeration() { + return new Enumeration<>() { String name; --- old/src/java.base/share/classes/java/util/jar/JarVerifier.java 2015-04-22 17:44:04.503423048 -0700 +++ new/src/java.base/share/classes/java/util/jar/JarVerifier.java 2015-04-22 17:44:04.335423044 -0700 @@ -684,7 +684,7 @@ final List signersReq = req; final Enumeration enum2 = (matchUnsigned) ? unsignedEntryNames(jar) : emptyEnumeration; - return new Enumeration() { + return new Enumeration<>() { String name; @@ -726,7 +726,7 @@ final Map map = new HashMap<>(); map.putAll(signerMap()); final Enumeration enum_ = e; - return new Enumeration() { + return new Enumeration<>() { Enumeration signers = null; JarEntry entry; @@ -786,7 +786,7 @@ private Enumeration unsignedEntryNames(JarFile jar) { final Map map = signerMap(); final Enumeration entries = jar.entries(); - return new Enumeration() { + return new Enumeration<>() { String name; --- old/src/java.base/share/classes/sun/misc/Cleaner.java 2015-04-22 17:44:04.943423058 -0700 +++ new/src/java.base/share/classes/sun/misc/Cleaner.java 2015-04-22 17:44:04.767423054 -0700 @@ -142,7 +142,7 @@ try { thunk.run(); } catch (final Throwable x) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { if (System.err != null) new Error("Cleaner terminated abnormally", x) --- 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); --- old/src/java.base/share/classes/sun/net/NetworkClient.java 2015-04-22 17:44:05.815423078 -0700 +++ new/src/java.base/share/classes/sun/net/NetworkClient.java 2015-04-22 17:44:05.639423074 -0700 @@ -69,7 +69,7 @@ final String encs[] = { null }; AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Void run() { vals[0] = Integer.getInteger("sun.net.client.defaultReadTimeout", 0).intValue(); vals[1] = Integer.getInteger("sun.net.client.defaultConnectTimeout", 0).intValue(); @@ -154,7 +154,7 @@ if (proxy != null) { if (proxy.type() == Proxy.Type.SOCKS) { s = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Socket run() { return new Socket(proxy); }}); @@ -201,7 +201,7 @@ if (serverSocket == null) throw new IOException("not connected"); return AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public InetAddress run() { return serverSocket.getLocalAddress(); --- old/src/java.base/share/classes/sun/net/ProgressMonitor.java 2015-04-22 17:44:06.251423088 -0700 +++ new/src/java.base/share/classes/sun/net/ProgressMonitor.java 2015-04-22 17:44:06.079423084 -0700 @@ -64,7 +64,7 @@ * Return a snapshot of the ProgressSource list */ public ArrayList getProgressSources() { - ArrayList snapshot = new ArrayList(); + ArrayList snapshot = new ArrayList<>(); try { synchronized(progressSourceList) { @@ -114,7 +114,7 @@ if (progressListenerList.size() > 0) { // Notify progress listener if there is progress change - ArrayList listeners = new ArrayList(); + ArrayList listeners = new ArrayList<>(); // Copy progress listeners to another list to avoid holding locks synchronized(progressListenerList) { @@ -151,7 +151,7 @@ if (progressListenerList.size() > 0) { // Notify progress listener if there is progress change - ArrayList listeners = new ArrayList(); + ArrayList listeners = new ArrayList<>(); // Copy progress listeners to another list to avoid holding locks synchronized(progressListenerList) { @@ -183,7 +183,7 @@ if (progressListenerList.size() > 0) { // Notify progress listener if there is progress change - ArrayList listeners = new ArrayList(); + ArrayList listeners = new ArrayList<>(); // Copy progress listeners to another list to avoid holding locks synchronized(progressListenerList) { --- old/src/java.base/share/classes/sun/net/www/MessageHeader.java 2015-04-22 17:44:06.683423098 -0700 +++ new/src/java.base/share/classes/sun/net/www/MessageHeader.java 2015-04-22 17:44:06.515423094 -0700 @@ -244,7 +244,7 @@ public synchronized Map> filterAndAddHeaders( String[] excludeList, Map> include) { boolean skipIt = false; - Map> m = new HashMap>(); + Map> m = new HashMap<>(); for (int i = nkeys; --i >= 0;) { if (excludeList != null) { // check if the key is in the excludeList. @@ -260,7 +260,7 @@ if (!skipIt) { List l = m.get(keys[i]); if (l == null) { - l = new ArrayList(); + l = new ArrayList<>(); m.put(keys[i], l); } l.add(values[i]); @@ -274,7 +274,7 @@ for (Map.Entry> entry: include.entrySet()) { List l = m.get(entry.getKey()); if (l == null) { - l = new ArrayList(); + l = new ArrayList<>(); m.put(entry.getKey(), l); } l.addAll(entry.getValue()); --- old/src/java.base/share/classes/sun/net/www/http/HttpCapture.java 2015-04-22 17:44:07.135423109 -0700 +++ new/src/java.base/share/classes/sun/net/www/http/HttpCapture.java 2015-04-22 17:44:06.963423105 -0700 @@ -64,7 +64,7 @@ private static synchronized void init() { initialized = true; String rulesFile = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public String run() { return NetProperties.get("sun.net.http.captureRules"); } @@ -85,8 +85,8 @@ String[] s = line.split(","); if (s.length == 2) { if (patterns == null) { - patterns = new ArrayList(); - capFiles = new ArrayList(); + patterns = new ArrayList<>(); + capFiles = new ArrayList<>(); } patterns.add(Pattern.compile(s[0].trim())); capFiles.add(s[1].trim()); --- old/src/java.base/share/classes/sun/net/www/http/HttpClient.java 2015-04-22 17:44:07.563423119 -0700 +++ new/src/java.base/share/classes/sun/net/www/http/HttpClient.java 2015-04-22 17:44:07.395423115 -0700 @@ -479,7 +479,7 @@ { try { java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public Void run() throws IOException { openServer(server.getHostString(), server.getPort()); return null; --- old/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java 2015-04-22 17:44:08.019423129 -0700 +++ new/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java 2015-04-22 17:44:07.839423125 -0700 @@ -94,7 +94,7 @@ */ final KeepAliveCache cache = this; java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { keepAliveTimer = new InnocuousThread(cache, "Keep-Alive-Timer"); keepAliveTimer.setDaemon(true); @@ -178,7 +178,7 @@ long currentTime = System.currentTimeMillis(); ArrayList keysToRemove - = new ArrayList(); + = new ArrayList<>(); for (KeepAliveKey key : keySet()) { ClientVector v = get(key); --- old/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java 2015-04-22 17:44:08.447423139 -0700 +++ new/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java 2015-04-22 17:44:08.279423135 -0700 @@ -122,7 +122,7 @@ this.dontUseNegotiate = dontUseNegotiate; rsp = response; this.hdrname = hdrname; - schemes = new HashMap(); + schemes = new HashMap<>(); parse(); } --- old/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java 2015-04-22 17:44:08.879423149 -0700 +++ new/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java 2015-04-22 17:44:08.707423145 -0700 @@ -62,7 +62,7 @@ static { Boolean b = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Boolean run() { return NetProperties.getBoolean(compatPropName); } --- old/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2015-04-22 17:44:09.339423160 -0700 +++ new/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java 2015-04-22 17:44:09.171423156 -0700 @@ -244,7 +244,7 @@ new sun.security.action.GetBooleanAction( "sun.net.http.allowRestrictedHeaders")).booleanValue(); if (!allowRestrictedHeaders) { - restrictedHeaderSet = new HashSet(restrictedHeaders.length); + restrictedHeaderSet = new HashSet<>(restrictedHeaders.length); for (int i=0; i < restrictedHeaders.length; i++) { restrictedHeaderSet.add(restrictedHeaders[i].toLowerCase()); } @@ -413,7 +413,7 @@ final URL url, final RequestorType authType) { return java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public PasswordAuthentication run() { if (logger.isLoggable(PlatformLogger.Level.FINEST)) { logger.finest("Requesting Authentication: host =" + host + " url = " + url); @@ -817,14 +817,14 @@ } catch (SecurityException se) { /* swallow exception */ } } else { cookieHandler = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public CookieHandler run() { return CookieHandler.getDefault(); } }); } cacheHandler = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public ResponseCache run() { return ResponseCache.getDefault(); } @@ -909,7 +909,7 @@ final boolean result[] = {false}; java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { try { InetAddress a1 = InetAddress.getByName(h1); @@ -954,7 +954,7 @@ try { // lookup hostname and use IP address if available host = AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public String run() throws IOException { InetAddress addr = InetAddress.getByName(hostarg); return addr.getHostAddress(); @@ -984,7 +984,7 @@ if (p != null) { try { AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public Void run() throws IOException { plainConnect0(); return null; @@ -1086,7 +1086,7 @@ */ ProxySelector sel = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public ProxySelector run() { return ProxySelector.getDefault(); } @@ -1245,7 +1245,7 @@ if (p != null) { try { return AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public OutputStream run() throws IOException { return getOutputStream0(); } @@ -1423,7 +1423,7 @@ if (p != null) { try { return AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public InputStream run() throws IOException { return getInputStream0(); } @@ -1877,7 +1877,7 @@ final Object[] args = { rememberedException.getMessage() }; IOException chainedException = java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public IOException run() throws Exception { return (IOException) rememberedException.getClass() @@ -2204,7 +2204,7 @@ try { final String finalHost = host; addr = java.security.AccessController.doPrivileged( - new java.security.PrivilegedExceptionAction() { + new java.security.PrivilegedExceptionAction<>() { public InetAddress run() throws java.net.UnknownHostException { return InetAddress.getByName(finalHost); @@ -2566,7 +2566,7 @@ if (p != null) { try { return AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public Boolean run() throws IOException { return followRedirect0(loc, stat, locUrl0); } --- old/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java 2015-04-22 17:44:09.819423171 -0700 +++ new/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java 2015-04-22 17:44:09.647423167 -0700 @@ -213,7 +213,7 @@ /* get the stream before asserting privileges */ try (final InputStream in = url.openConnection().getInputStream()) { result = AccessController.doPrivileged( - new PrivilegedExceptionAction() { + new PrivilegedExceptionAction<>() { public JarFile run() throws IOException { Path tmpFile = Files.createTempFile("jar_cache", null); try { --- old/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java 2015-04-22 17:44:10.291423182 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java 2015-04-22 17:44:10.091423177 -0700 @@ -76,7 +76,7 @@ this.pool = pool; if (pool.isFixedThreadPool()) { - taskQueue = new ConcurrentLinkedQueue(); + taskQueue = new ConcurrentLinkedQueue<>(); } else { taskQueue = null; // not used } @@ -115,7 +115,7 @@ } private void startInternalThread(final Runnable task) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { // internal threads should not be visible to application so @@ -246,7 +246,7 @@ abstract void shutdownHandlerTasks(); private void shutdownExecutors() { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { pool.executor().shutdown(); timeoutExecutor.shutdown(); @@ -323,7 +323,7 @@ task = new Runnable() { @Override public void run() { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { delegate.run(); --- old/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java 2015-04-22 17:44:10.719423192 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java 2015-04-22 17:44:10.551423188 -0700 @@ -228,7 +228,7 @@ static final Set> defaultOptions = defaultOptions(); private static Set> defaultOptions() { - HashSet> set = new HashSet>(2); + HashSet> set = new HashSet<>(2); set.add(StandardSocketOptions.SO_RCVBUF); set.add(StandardSocketOptions.SO_REUSEADDR); return Collections.unmodifiableSet(set); --- old/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java 2015-04-22 17:44:11.151423202 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java 2015-04-22 17:44:10.979423198 -0700 @@ -503,7 +503,7 @@ static final Set> defaultOptions = defaultOptions(); private static Set> defaultOptions() { - HashSet> set = new HashSet>(5); + HashSet> set = new HashSet<>(5); set.add(StandardSocketOptions.SO_SNDBUF); set.add(StandardSocketOptions.SO_RCVBUF); set.add(StandardSocketOptions.SO_KEEPALIVE); --- old/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java 2015-04-22 17:44:11.583423212 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java 2015-04-22 17:44:11.411423208 -0700 @@ -294,7 +294,7 @@ static final Set> defaultOptions = defaultOptions(); private static Set> defaultOptions() { - HashSet> set = new HashSet>(8); + HashSet> set = new HashSet<>(8); set.add(StandardSocketOptions.SO_SNDBUF); set.add(StandardSocketOptions.SO_RCVBUF); set.add(StandardSocketOptions.SO_REUSEADDR); --- old/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java 2015-04-22 17:44:12.027423222 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java 2015-04-22 17:44:11.855423218 -0700 @@ -184,7 +184,7 @@ // created blocked set if required and add source address if (blockedSet == null) - blockedSet = new HashSet(); + blockedSet = new HashSet<>(); blockedSet.add(toBlock); } return this; --- old/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java 2015-04-22 17:44:12.455423232 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java 2015-04-22 17:44:12.287423228 -0700 @@ -84,13 +84,13 @@ InetAddress group = key.group(); List keys; if (groups == null) { - groups = new HashMap>(); + groups = new HashMap<>(); keys = null; } else { keys = groups.get(group); } if (keys == null) { - keys = new LinkedList(); + keys = new LinkedList<>(); groups.put(group, keys); } keys.add(key); --- old/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java 2015-04-22 17:44:12.907423242 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java 2015-04-22 17:44:12.715423238 -0700 @@ -52,8 +52,8 @@ protected SelectorImpl(SelectorProvider sp) { super(sp); - keys = new HashSet(); - selectedKeys = new HashSet(); + keys = new HashSet<>(); + selectedKeys = new HashSet<>(); if (Util.atBugLevel("1.4")) { publicKeys = keys; publicSelectedKeys = selectedKeys; --- old/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java 2015-04-22 17:44:13.339423252 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java 2015-04-22 17:44:13.171423249 -0700 @@ -182,7 +182,7 @@ static final Set> defaultOptions = defaultOptions(); private static Set> defaultOptions() { - HashSet> set = new HashSet>(2); + HashSet> set = new HashSet<>(2); set.add(StandardSocketOptions.SO_RCVBUF); set.add(StandardSocketOptions.SO_REUSEADDR); set.add(StandardSocketOptions.IP_TOS); --- old/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java 2015-04-22 17:44:13.775423263 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java 2015-04-22 17:44:13.599423258 -0700 @@ -229,7 +229,7 @@ static final Set> defaultOptions = defaultOptions(); private static Set> defaultOptions() { - HashSet> set = new HashSet>(8); + HashSet> set = new HashSet<>(8); set.add(StandardSocketOptions.SO_SNDBUF); set.add(StandardSocketOptions.SO_RCVBUF); set.add(StandardSocketOptions.SO_KEEPALIVE); --- old/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java 2015-04-22 17:44:14.219423273 -0700 +++ new/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java 2015-04-22 17:44:14.051423269 -0700 @@ -135,7 +135,7 @@ // init the CharsetMapping object from the .dat binary file public static CharsetMapping get(final InputStream is) { - return AccessController.doPrivileged(new PrivilegedAction() { + return AccessController.doPrivileged(new PrivilegedAction<>() { public CharsetMapping run() { return new CharsetMapping().load(is); } --- old/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java 2015-04-22 17:44:14.647423283 -0700 +++ new/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java 2015-04-22 17:44:14.479423279 -0700 @@ -48,7 +48,7 @@ private boolean shutdown; protected AbstractPoller() { - this.requestList = new LinkedList(); + this.requestList = new LinkedList<>(); this.shutdown = false; } @@ -57,7 +57,7 @@ */ public void start() { final Runnable thisRunnable = this; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Object run() { Thread thr = new ManagedLocalsThread(thisRunnable); --- old/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java 2015-04-22 17:44:15.091423293 -0700 +++ new/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java 2015-04-22 17:44:14.919423289 -0700 @@ -70,8 +70,8 @@ this.watcher = watcher; this.dir = dir; this.state = State.READY; - this.events = new ArrayList>(); - this.lastModifyEvents = new HashMap>(); + this.events = new ArrayList<>(); + this.lastModifyEvents = new HashMap<>(); } final AbstractWatchService watcher() { @@ -146,7 +146,7 @@ // non-repeated event Event ev = - new Event((WatchEvent.Kind)kind, context); + new Event<>((WatchEvent.Kind)kind, context); if (isModify) { lastModifyEvents.put(context, ev); } else if (kind == StandardWatchEventKinds.OVERFLOW) { @@ -163,7 +163,7 @@ public final List> pollEvents() { synchronized (this) { List> result = events; - events = new ArrayList>(); + events = new ArrayList<>(); lastModifyEvents.clear(); return result; } --- old/src/java.base/share/classes/sun/reflect/ReflectionFactory.java 2015-04-22 17:44:15.523423303 -0700 +++ new/src/java.base/share/classes/sun/reflect/ReflectionFactory.java 2015-04-22 17:44:15.351423299 -0700 @@ -375,7 +375,7 @@ private static void checkInitted() { if (initted) return; AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Void run() { // Tests to ensure the system properties table is fully // initialized. This is needed because reflection code is --- old/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java 2015-04-22 17:44:15.959423313 -0700 +++ new/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java 2015-04-22 17:44:15.787423309 -0700 @@ -106,16 +106,16 @@ throw new IllegalArgumentException("Not an annotation type"); Method[] methods = - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Method[] run() { // Initialize memberTypes and defaultValues return annotationClass.getDeclaredMethods(); } }); - memberTypes = new HashMap>(methods.length+1, 1.0f); - memberDefaults = new HashMap(0); - members = new HashMap(methods.length+1, 1.0f); + memberTypes = new HashMap<>(methods.length+1, 1.0f); + memberDefaults = new HashMap<>(0); + members = new HashMap<>(methods.length+1, 1.0f); for (Method method : methods) { if (method.getParameterTypes().length != 0) --- old/src/java.base/share/classes/sun/util/PreHashedMap.java 2015-04-22 17:44:16.395423323 -0700 +++ new/src/java.base/share/classes/sun/util/PreHashedMap.java 2015-04-22 17:44:16.219423319 -0700 @@ -166,14 +166,14 @@ } public Set keySet() { - return new AbstractSet () { + return new AbstractSet<> () { public int size() { return size; } public Iterator iterator() { - return new Iterator() { + return new Iterator<>() { private int i = -1; Object[] a = null; String cur = null; --- old/src/java.base/share/classes/sun/util/logging/PlatformLogger.java 2015-04-22 17:44:16.823423333 -0700 +++ new/src/java.base/share/classes/sun/util/logging/PlatformLogger.java 2015-04-22 17:44:16.655423329 -0700 @@ -161,7 +161,7 @@ private static boolean loggingEnabled; static { loggingEnabled = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { public Boolean run() { String cname = System.getProperty("java.util.logging.config.class"); String fname = System.getProperty("java.util.logging.config.file"); --- old/src/java.base/share/classes/sun/util/resources/LocaleData.java 2015-04-22 17:44:17.263423343 -0700 +++ new/src/java.base/share/classes/sun/util/resources/LocaleData.java 2015-04-22 17:44:17.095423339 -0700 @@ -159,7 +159,7 @@ } public static ResourceBundle getBundle(final String baseName, final Locale locale) { - return AccessController.doPrivileged(new PrivilegedAction() { + return AccessController.doPrivileged(new PrivilegedAction<>() { @Override public ResourceBundle run() { return ResourceBundle @@ -169,7 +169,7 @@ } private static OpenListResourceBundle getSupplementary(final String baseName, final Locale locale) { - return AccessController.doPrivileged(new PrivilegedAction() { + return AccessController.doPrivileged(new PrivilegedAction<>() { @Override public OpenListResourceBundle run() { OpenListResourceBundle rb = null; --- old/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java 2015-04-22 17:44:17.695423353 -0700 +++ new/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java 2015-04-22 17:44:17.523423349 -0700 @@ -213,7 +213,7 @@ if (parent == null) { return set.iterator(); } - return new Iterator() { + return new Iterator<>() { private Iterator itr = set.iterator(); private boolean usingParent; --- old/src/java.base/unix/classes/java/lang/ProcessEnvironment.java 2015-04-22 17:44:18.143423364 -0700 +++ new/src/java.base/unix/classes/java/lang/ProcessEnvironment.java 2015-04-22 17:44:17.971423360 -0700 @@ -99,7 +99,7 @@ /* Only for use by Runtime.exec(...String[]envp...) */ static Map emptyEnvironment(int capacity) { - return new StringEnvironment(new HashMap(capacity)); + return new StringEnvironment(new HashMap<>(capacity)); } private static native byte[][] environ(); --- old/src/java.base/unix/classes/sun/net/PortConfig.java 2015-04-22 17:44:18.575423374 -0700 +++ new/src/java.base/unix/classes/sun/net/PortConfig.java 2015-04-22 17:44:18.403423370 -0700 @@ -42,7 +42,7 @@ static { AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("net"); String os = System.getProperty("os.name"); --- old/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java 2015-04-22 17:44:19.003423384 -0700 +++ new/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java 2015-04-22 17:44:18.835423380 -0700 @@ -131,7 +131,7 @@ // get the name servers from /etc/resolv.conf nameservers = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction>() { + new java.security.PrivilegedAction<>() { public LinkedList run() { // typically MAXNS is 3 but we've picked 5 here // to allow for additional servers if required. @@ -156,7 +156,7 @@ // first try the search keyword in /etc/resolv.conf sl = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction>() { + new java.security.PrivilegedAction<>() { public LinkedList run() { LinkedList ll; @@ -182,7 +182,7 @@ String localDomain = localDomain0(); if (localDomain != null && localDomain.length() > 0) { - sl = new LinkedList(); + sl = new LinkedList<>(); sl.add(localDomain); return sl; } @@ -190,7 +190,7 @@ // try domain keyword in /etc/resolv.conf sl = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction>() { + new java.security.PrivilegedAction<>() { public LinkedList run() { LinkedList ll; @@ -260,7 +260,7 @@ static { java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { System.loadLibrary("net"); return null; --- old/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java 2015-04-22 17:44:19.435423394 -0700 +++ new/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java 2015-04-22 17:44:19.267423390 -0700 @@ -198,7 +198,7 @@ { Scanner scanner = new Scanner(new File(file)); try { - List result = new ArrayList(); + List result = new ArrayList<>(); while (scanner.hasNextLine()) { String line = scanner.nextLine().trim(); --- old/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java 2015-04-22 17:44:19.867423404 -0700 +++ new/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java 2015-04-22 17:44:19.699423400 -0700 @@ -95,7 +95,7 @@ private void init0() { hostname = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public String run() { String localhost; try { --- old/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java 2015-04-22 17:44:20.303423414 -0700 +++ new/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java 2015-04-22 17:44:20.135423410 -0700 @@ -216,7 +216,7 @@ // permission check must always be in initiator's context try { if (acc != null) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -287,7 +287,7 @@ synchronized (updateLock) { if (handler == null) { this.acceptHandler = null; - result = new PendingFuture(this); + result = new PendingFuture<>(this); this.acceptFuture = result; } else { this.acceptHandler = handler; --- old/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java 2015-04-22 17:44:20.755423424 -0700 +++ new/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java 2015-04-22 17:44:20.583423420 -0700 @@ -93,7 +93,7 @@ private static native byte[] probeUsingGnomeVfs(long pathAddress); static { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { System.loadLibrary("nio"); return null; --- old/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java 2015-04-22 17:44:21.187423434 -0700 +++ new/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java 2015-04-22 17:44:21.011423430 -0700 @@ -106,7 +106,7 @@ synchronized (this) { if (!loaded) { List lines = AccessController.doPrivileged( - new PrivilegedAction>() { + new PrivilegedAction<>() { @Override public List run() { try { --- old/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java 2015-04-22 17:44:21.619423444 -0700 +++ new/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java 2015-04-22 17:44:21.447423440 -0700 @@ -606,7 +606,7 @@ throws UnixException; static { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { @Override public Void run() { System.loadLibrary("nio"); --- old/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java 2015-04-22 17:44:22.051423454 -0700 +++ new/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java 2015-04-22 17:44:21.883423450 -0700 @@ -222,7 +222,7 @@ synchronized (loadLock) { if (props == null) { props = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { @Override public Properties run() { return loadProperties(); --- old/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java 2015-04-22 17:44:22.483423464 -0700 +++ new/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java 2015-04-22 17:44:22.311423460 -0700 @@ -152,7 +152,7 @@ public final Iterable getRootDirectories() { final List allowedList = Collections.unmodifiableList(Arrays.asList((Path)rootDirectory)); - return new Iterable() { + return new Iterable<>() { public Iterator iterator() { try { SecurityManager sm = System.getSecurityManager(); @@ -254,7 +254,7 @@ return Collections.emptyList(); } } - return new Iterable() { + return new Iterable<>() { public Iterator iterator() { return new FileStoreIterator(); } --- old/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java 2015-04-22 17:44:22.919423474 -0700 +++ new/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java 2015-04-22 17:44:22.743423470 -0700 @@ -568,7 +568,7 @@ private static native int init(); static { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { System.loadLibrary("nio"); return null; --- old/src/java.base/unix/classes/sun/nio/fs/UnixPath.java 2015-04-22 17:44:23.375423485 -0700 +++ new/src/java.base/unix/classes/sun/nio/fs/UnixPath.java 2015-04-22 17:44:23.203423481 -0700 @@ -121,7 +121,7 @@ ce = Util.jnuEncoding().newEncoder() .onMalformedInput(CodingErrorAction.REPORT) .onUnmappableCharacter(CodingErrorAction.REPORT); - encoder.set(new SoftReference(ce)); + encoder.set(new SoftReference<>(ce)); } char[] ca = fs.normalizeNativePath(input.toCharArray());