changeset 11805:98ce6490ceff

8078467: Update core libraries to use diamond with anonymous classes Reviewed-by: mchung, alanb
author darcy
date Thu, 23 Apr 2015 09:32:35 -0700
parents 1e5cc55ae5d3
children 0f3007a3ce63
files src/java.base/linux/classes/sun/nio/ch/EPollPort.java src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java src/java.base/share/classes/java/io/ExpiringCache.java src/java.base/share/classes/java/io/FilePermission.java src/java.base/share/classes/java/io/ObjectInputStream.java src/java.base/share/classes/java/io/ObjectOutputStream.java src/java.base/share/classes/java/io/ObjectStreamClass.java src/java.base/share/classes/java/lang/CharacterName.java src/java.base/share/classes/java/lang/Class.java src/java.base/share/classes/java/lang/ClassLoader.java src/java.base/share/classes/java/lang/Package.java src/java.base/share/classes/java/lang/SecurityManager.java src/java.base/share/classes/java/lang/System.java src/java.base/share/classes/java/lang/Thread.java src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java src/java.base/share/classes/java/lang/invoke/SerializedLambda.java src/java.base/share/classes/java/lang/ref/Finalizer.java src/java.base/share/classes/java/lang/reflect/Proxy.java src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java src/java.base/share/classes/java/net/CookieManager.java src/java.base/share/classes/java/net/DatagramPacket.java src/java.base/share/classes/java/net/DatagramSocket.java src/java.base/share/classes/java/net/HttpConnectSocketImpl.java src/java.base/share/classes/java/net/HttpCookie.java src/java.base/share/classes/java/net/IDN.java src/java.base/share/classes/java/net/InMemoryCookieStore.java src/java.base/share/classes/java/net/InetAddress.java src/java.base/share/classes/java/net/NetworkInterface.java src/java.base/share/classes/java/net/Socket.java src/java.base/share/classes/java/net/SocketPermission.java src/java.base/share/classes/java/net/SocksSocketImpl.java src/java.base/share/classes/java/net/URL.java src/java.base/share/classes/java/net/URLClassLoader.java src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java src/java.base/share/classes/java/nio/channels/FileChannel.java src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java src/java.base/share/classes/java/nio/charset/Charset.java src/java.base/share/classes/java/nio/charset/CoderResult.java src/java.base/share/classes/java/nio/file/FileSystems.java src/java.base/share/classes/java/nio/file/Files.java src/java.base/share/classes/java/nio/file/Path.java src/java.base/share/classes/java/nio/file/attribute/AclEntry.java src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java src/java.base/share/classes/java/time/format/DateTimeParseContext.java src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java src/java.base/share/classes/java/util/Calendar.java src/java.base/share/classes/java/util/Currency.java src/java.base/share/classes/java/util/ResourceBundle.java src/java.base/share/classes/java/util/TimeZone.java src/java.base/share/classes/java/util/jar/JarFile.java src/java.base/share/classes/java/util/jar/JarVerifier.java src/java.base/share/classes/sun/misc/Cleaner.java src/java.base/share/classes/sun/misc/URLClassPath.java src/java.base/share/classes/sun/net/NetworkClient.java src/java.base/share/classes/sun/net/ProgressMonitor.java src/java.base/share/classes/sun/net/www/MessageHeader.java src/java.base/share/classes/sun/net/www/http/HttpCapture.java src/java.base/share/classes/sun/net/www/http/HttpClient.java src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java src/java.base/share/classes/sun/nio/ch/SelectorImpl.java src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java src/java.base/share/classes/sun/nio/cs/CharsetMapping.java src/java.base/share/classes/sun/nio/fs/AbstractPoller.java src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java src/java.base/share/classes/sun/reflect/ReflectionFactory.java src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java src/java.base/share/classes/sun/util/PreHashedMap.java src/java.base/share/classes/sun/util/logging/PlatformLogger.java src/java.base/share/classes/sun/util/resources/LocaleData.java src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java src/java.base/unix/classes/java/lang/ProcessEnvironment.java src/java.base/unix/classes/sun/net/PortConfig.java src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java src/java.base/unix/classes/sun/net/sdp/SdpProvider.java src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java src/java.base/unix/classes/sun/nio/fs/UnixPath.java
diffstat 109 files changed, 231 insertions(+), 232 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Thu Apr 23 09:32:35 2015 -0700
@@ -105,7 +105,7 @@
 
         // create the queue and offer the special event to ensure that the first
         // threads polls
-        this.queue = new ArrayBlockingQueue<Event>(MAX_EPOLL_EVENTS);
+        this.queue = new ArrayBlockingQueue<>(MAX_EPOLL_EVENTS);
         this.queue.offer(NEED_TO_POLL);
     }
 
--- a/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java	Thu Apr 23 09:32:35 2015 -0700
@@ -121,7 +121,7 @@
     private static native void init();
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java	Thu Apr 23 09:32:35 2015 -0700
@@ -190,7 +190,7 @@
             this.watcher = watcher;
             this.ifd = ifd;
             this.socketpair = sp;
-            this.wdToKey = new HashMap<Integer,LinuxWatchKey>();
+            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<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java	Thu Apr 23 09:32:35 2015 -0700
@@ -68,7 +68,7 @@
     private static native byte[] probe0(long pathAddress);
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 System.loadLibrary("nio");
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Thu Apr 23 09:32:35 2015 -0700
@@ -87,7 +87,7 @@
         // If loading from stand alone build uncomment this.
         // System.loadLibrary("unpack");
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("unpack");
                     return null;
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Thu Apr 23 09:32:35 2015 -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<File>() {
+        Collections.sort(files, new Comparator<>() {
                 public int compare(File r0, File r1) {
                     // Get the file name.
                     String f0 = r0.nameString;
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1151,7 +1151,7 @@
         return -1;
     }
 
-    Comparator<Entry> entryOutputOrder = new Comparator<Entry>() {
+    Comparator<Entry> entryOutputOrder = new Comparator<>() {
         public int compare(Entry e0, Entry e1) {
             int k0 = getOutputIndex(e0);
             int k1 = getOutputIndex(e1);
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Thu Apr 23 09:32:35 2015 -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<Attribute.Layout, int[]>());
+            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<Map.Entry<Attribute.Layout, int[]>>() {
+                        new Comparator<>() {
                 public int compare(Map.Entry<Attribute.Layout, int[]> e0,
                                    Map.Entry<Attribute.Layout, int[]> 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<Object[]>() {
+        Arrays.sort(defs, new Comparator<>() {
             public int compare(Object[] a0, Object[] a1) {
                 // Primary sort key is attr def header.
                 @SuppressWarnings("unchecked")
--- a/src/java.base/share/classes/java/io/ExpiringCache.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/io/ExpiringCache.java	Thu Apr 23 09:32:35 2015 -0700
@@ -64,7 +64,7 @@
     @SuppressWarnings("serial")
     ExpiringCache(long millisUntilExpiration) {
         this.millisUntilExpiration = millisUntilExpiration;
-        map = new LinkedHashMap<String,Entry>() {
+        map = new LinkedHashMap<>() {
             protected boolean removeEldestEntry(Map.Entry<String,Entry> eldest) {
               return size() > MAX_ENTRIES;
             }
--- a/src/java.base/share/classes/java/io/FilePermission.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/io/FilePermission.java	Thu Apr 23 09:32:35 2015 -0700
@@ -201,7 +201,7 @@
         }
 
         // store only the canonical cpath if possible
-        cpath = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        cpath = AccessController.doPrivileged(new PrivilegedAction<>() {
             public String run() {
                 try {
                     String path = cpath;
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1263,7 +1263,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != ObjectInputStream.class;
@@ -2255,7 +2255,7 @@
             try {
                 while (list != null) {
                     AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<Void>()
+                        new PrivilegedExceptionAction<>()
                     {
                         public Void run() throws InvalidObjectException {
                             list.obj.validateObject();
--- a/src/java.base/share/classes/java/io/ObjectOutputStream.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1066,7 +1066,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != ObjectOutputStream.class;
--- a/src/java.base/share/classes/java/io/ObjectStreamClass.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/io/ObjectStreamClass.java	Thu Apr 23 09:32:35 2015 -0700
@@ -367,7 +367,7 @@
                 entry = th;
             }
             if (future.set(entry)) {
-                Caches.localDescs.put(key, new SoftReference<Object>(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<Void>() {
+                    new PrivilegedAction<>() {
                         public Void run() {
                             Thread.currentThread().interrupt();
                             return null;
@@ -465,7 +465,7 @@
         localDesc = this;
 
         if (serializable) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            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<MemberSignature>() {
+            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<MemberSignature>() {
+            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<MemberSignature>() {
+            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<Object>(entry));
+            Caches.reflectors.put(key, new SoftReference<>(entry));
         }
 
         if (entry instanceof FieldReflector) {
--- a/src/java.base/share/classes/java/lang/CharacterName.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/CharacterName.java	Thu Apr 23 09:32:35 2015 -0700
@@ -45,7 +45,7 @@
         DataInputStream dis = null;
         try {
             dis = new DataInputStream(new InflaterInputStream(
-                AccessController.doPrivileged(new PrivilegedAction<InputStream>()
+                AccessController.doPrivileged(new PrivilegedAction<>()
                 {
                     public InputStream run() {
                         return getClass().getResourceAsStream("uniName.dat");
--- a/src/java.base/share/classes/java/lang/Class.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/Class.java	Thu Apr 23 09:32:35 2015 -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<Void>() {
+                    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<Method[]>() {
+                    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<Constructor<?>[]>() {
+                    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<Class<?>[]>() {
+            new java.security.PrivilegedAction<>() {
                 public Class<?>[] run() {
                     List<Class<?>> 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<Void>() {
+        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<Void>() {
+                    new java.security.PrivilegedAction<>() {
                         public Void run() {
                                 values.setAccessible(true);
                                 return null;
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Apr 23 09:32:35 2015 -0700
@@ -496,7 +496,7 @@
             final String name = cls.getName();
             final int i = name.lastIndexOf('.');
             if (i != -1) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         sm.checkPackageAccess(name.substring(0, i));
                         return null;
@@ -1265,7 +1265,7 @@
     {
         final Enumeration<Resource> e =
             getBootstrapClassPath().getResources(name);
-        return new Enumeration<URL> () {
+        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<String>() {
+                new PrivilegedAction<>() {
                     public String run() {
                         try {
                             return file.exists() ? file.getCanonicalPath() : null;
--- a/src/java.base/share/classes/java/lang/Package.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/Package.java	Thu Apr 23 09:32:35 2015 -0700
@@ -595,7 +595,7 @@
 
         CachedManifest(final String fileName) {
             this.fileName = fileName;
-            this.url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+            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<Manifest>() {
+                m = AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Manifest run() {
                         try (FileInputStream fis = new FileInputStream(fileName);
                              JarInputStream jis = new JarInputStream(fis, false)) {
--- a/src/java.base/share/classes/java/lang/SecurityManager.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/SecurityManager.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1455,7 +1455,7 @@
             if (!packageAccessValid) {
                 String tmpPropertyStr =
                     AccessController.doPrivileged(
-                        new PrivilegedAction<String>() {
+                        new PrivilegedAction<>() {
                             public String run() {
                                 return java.security.Security.getProperty(
                                     "package.access");
@@ -1524,7 +1524,7 @@
             if (!packageDefinitionValid) {
                 String tmpPropertyStr =
                     AccessController.doPrivileged(
-                        new PrivilegedAction<String>() {
+                        new PrivilegedAction<>() {
                             public String run() {
                                 return java.security.Security.getProperty(
                                     "package.definition");
--- a/src/java.base/share/classes/java/lang/System.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/System.java	Thu Apr 23 09:32:35 2015 -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<Object>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Object run() {
                     s.getClass().getProtectionDomain().implies
                         (SecurityConstants.ALL_PERMISSION);
--- a/src/java.base/share/classes/java/lang/Thread.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/Thread.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1661,7 +1661,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != Thread.class;
--- a/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java	Thu Apr 23 09:32:35 2015 -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>() {
+        Member mem = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Member run() {
                     try {
                         return reflectUnchecked();
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Thu Apr 23 09:32:35 2015 -0700
@@ -194,7 +194,7 @@
         final Class<?> innerClass = spinInnerClass();
         if (invokedType.parameterCount() == 0) {
             final Constructor<?>[] ctrs = AccessController.doPrivileged(
-                    new PrivilegedAction<Constructor<?>[]>() {
+                    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<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 @Override
                 public Void run() {
                     dumper.dumpClass(lambdaClassName, classBytes);
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Apr 23 09:32:35 2015 -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<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     try {
                         String dumpName = className;
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -51,7 +51,7 @@
     private static final int MAX_ARITY;
     static {
         final Object[] values = { 255 };
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        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<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         try {
                             Class<T> tClass = T.class;
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java	Thu Apr 23 09:32:35 2015 -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<Object>() {
+            proxy = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Object run() {
                     return Proxy.newProxyInstance(
                             loader,
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Thu Apr 23 09:32:35 2015 -0700
@@ -53,7 +53,7 @@
 
     static {
         final Object[] values = new Object[9];
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        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");
--- a/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java	Thu Apr 23 09:32:35 2015 -0700
@@ -64,7 +64,7 @@
         try {
             path = path.trim();
             final Path dir = Paths.get(path.length() == 0 ? "." : path);
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     @Override
                     public Void run() {
                         validateDumpDir(dir);
--- a/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java	Thu Apr 23 09:32:35 2015 -0700
@@ -218,7 +218,7 @@
 
     private Object readResolve() throws ReflectiveOperationException {
         try {
-            Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() {
+            Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
                 @Override
                 public Method run() throws Exception {
                     Method m = capturingClass.getDeclaredMethod("$deserializeLambda$", SerializedLambda.class);
--- a/src/java.base/share/classes/java/lang/ref/Finalizer.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/ref/Finalizer.java	Thu Apr 23 09:32:35 2015 -0700
@@ -121,7 +121,7 @@
      */
     private static void forkSecondaryFinalizer(final Runnable proc) {
         AccessController.doPrivileged(
-            new PrivilegedAction<Void>() {
+            new PrivilegedAction<>() {
                 public Void run() {
                     ThreadGroup tg = Thread.currentThread().getThreadGroup();
                     for (ThreadGroup tgn = tg;
--- a/src/java.base/share/classes/java/lang/reflect/Proxy.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java	Thu Apr 23 09:32:35 2015 -0700
@@ -728,7 +728,7 @@
 
             final Constructor<?> cons = cl.getConstructor(constructorParams);
             if (!Modifier.isPublic(cl.getModifiers())) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         cons.setAccessible(true);
                         return null;
--- a/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -62,7 +62,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -79,7 +79,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/share/classes/java/net/CookieManager.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/CookieManager.java	Thu Apr 23 09:32:35 2015 -0700
@@ -201,14 +201,13 @@
             throw new IllegalArgumentException("Argument is null");
         }
 
-        Map<String, List<String>> cookieMap =
-                        new java.util.HashMap<String, List<String>>();
+        Map<String, List<String>> 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<HttpCookie> cookies = new java.util.ArrayList<HttpCookie>();
+        List<HttpCookie> cookies = new java.util.ArrayList<>();
         String path = uri.getPath();
         if (path == null || path.isEmpty()) {
             path = "/";
@@ -411,7 +410,7 @@
     private List<String> sortByPath(List<HttpCookie> cookies) {
         Collections.sort(cookies, new CookiePathComparator());
 
-        List<String> cookieHeader = new java.util.ArrayList<String>();
+        List<String> 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
--- a/src/java.base/share/classes/java/net/DatagramPacket.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/DatagramPacket.java	Thu Apr 23 09:32:35 2015 -0700
@@ -47,7 +47,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/share/classes/java/net/DatagramSocket.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/DatagramSocket.java	Thu Apr 23 09:32:35 2015 -0700
@@ -308,7 +308,7 @@
         // getDeclaredMethod, therefore we need permission to access the member
         try {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Void>() {
+                new PrivilegedExceptionAction<>() {
                     public Void run() throws NoSuchMethodException {
                         Class<?>[] cl = new Class<?>[1];
                         cl[0] = DatagramPacket.class;
--- a/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -64,7 +64,7 @@
             serverSocketField = netClientClazz.getDeclaredField("serverSocket");
 
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
+                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<Socket>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Socket run() throws IOException {
                         return doTunnel(urlString, timeout);
                 }
--- a/src/java.base/share/classes/java/net/HttpCookie.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/HttpCookie.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1125,7 +1125,7 @@
      * @return  list of strings; never null
      */
     private static List<String> splitMultiCookies(String header) {
-        List<String> cookies = new java.util.ArrayList<String>();
+        List<String> cookies = new java.util.ArrayList<>();
         int quoteCount = 0;
         int p, q;
 
--- a/src/java.base/share/classes/java/net/IDN.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/IDN.java	Thu Apr 23 09:32:35 2015 -0700
@@ -228,7 +228,7 @@
         try {
             final String IDN_PROFILE = "uidna.spp";
             if (System.getSecurityManager() != null) {
-                stream = AccessController.doPrivileged(new PrivilegedAction<InputStream>() {
+                stream = AccessController.doPrivileged(new PrivilegedAction<>() {
                     public InputStream run() {
                         return StringPrep.class.getResourceAsStream(IDN_PROFILE);
                     }
--- a/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Thu Apr 23 09:32:35 2015 -0700
@@ -62,9 +62,9 @@
      * The default ctor
      */
     public InMemoryCookieStore() {
-        cookieJar = new ArrayList<HttpCookie>();
-        domainIndex = new HashMap<String, List<HttpCookie>>();
-        uriIndex = new HashMap<URI, List<HttpCookie>>();
+        cookieJar = new ArrayList<>();
+        domainIndex = new HashMap<>();
+        uriIndex = new HashMap<>();
 
         lock = new ReentrantLock(false);
     }
@@ -115,7 +115,7 @@
             throw new NullPointerException("uri is null");
         }
 
-        List<HttpCookie> cookies = new ArrayList<HttpCookie>();
+        List<HttpCookie> cookies = new ArrayList<>();
         boolean secureLink = "https".equalsIgnoreCase(uri.getScheme());
         lock.lock();
         try {
@@ -157,7 +157,7 @@
      * of this cookie store.
      */
     public List<URI> getURIs() {
-        List<URI> uris = new ArrayList<URI>();
+        List<URI> 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<HttpCookie> toRemove = new ArrayList<HttpCookie>();
+        ArrayList<HttpCookie> toRemove = new ArrayList<>();
         for (Map.Entry<String, List<HttpCookie>> entry : cookieIndex.entrySet()) {
             String domain = entry.getKey();
             List<HttpCookie> lst = entry.getValue();
@@ -368,7 +368,7 @@
 
                 cookies.add(cookie);
             } else {
-                cookies = new ArrayList<HttpCookie>();
+                cookies = new ArrayList<>();
                 cookies.add(cookie);
                 indexStore.put(index, cookies);
             }
--- a/src/java.base/share/classes/java/net/InetAddress.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/InetAddress.java	Thu Apr 23 09:32:35 2015 -0700
@@ -270,7 +270,7 @@
         preferIPv6Address = java.security.AccessController.doPrivileged(
             new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            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<NameService>() {
+                    new java.security.PrivilegedExceptionAction<>() {
                         public NameService run() {
                             Iterator<NameServiceDescriptor> 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<NameService>();
+        nameServices = new ArrayList<>();
         provider = AccessController.doPrivileged(
                 new GetPropertyAction(propPrefix + n));
         while (provider != null) {
--- a/src/java.base/share/classes/java/net/NetworkInterface.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/NetworkInterface.java	Thu Apr 23 09:32:35 2015 -0700
@@ -54,7 +54,7 @@
 
     static {
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
@@ -167,7 +167,7 @@
      * @since 1.6
      */
     public java.util.List<InterfaceAddress> getInterfaceAddresses() {
-        java.util.List<InterfaceAddress> lst = new java.util.ArrayList<InterfaceAddress>(1);
+        java.util.List<InterfaceAddress> lst = new java.util.ArrayList<>(1);
         SecurityManager sec = System.getSecurityManager();
         for (int j=0; j<bindings.length; j++) {
             try {
@@ -346,7 +346,7 @@
         if (netifs == null)
             return null;
 
-        return new Enumeration<NetworkInterface>() {
+        return new Enumeration<>() {
             private int i = 0;
             public NetworkInterface nextElement() {
                 if (netifs != null && i < netifs.length) {
--- a/src/java.base/share/classes/java/net/Socket.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/Socket.java	Thu Apr 23 09:32:35 2015 -0700
@@ -470,7 +470,7 @@
         // getDeclaredMethod, therefore we need permission to access the member
 
         oldImpl = AccessController.doPrivileged
-                                (new PrivilegedAction<Boolean>() {
+                                (new PrivilegedAction<>() {
             public Boolean run() {
                 Class<?> clazz = impl.getClass();
                 while (true) {
@@ -911,7 +911,7 @@
         InputStream is = null;
         try {
             is = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<InputStream>() {
+                new PrivilegedExceptionAction<>() {
                     public InputStream run() throws IOException {
                         return impl.getInputStream();
                     }
@@ -951,7 +951,7 @@
         OutputStream os = null;
         try {
             os = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<OutputStream>() {
+                new PrivilegedExceptionAction<>() {
                     public OutputStream run() throws IOException {
                         return impl.getOutputStream();
                     }
--- a/src/java.base/share/classes/java/net/SocketPermission.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/SocketPermission.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1194,7 +1194,7 @@
      */
     private static int initEphemeralPorts(String suffix, int defval) {
         return AccessController.doPrivileged(
-            new PrivilegedAction<Integer>(){
+            new PrivilegedAction<>(){
                 public Integer run() {
                     int val = Integer.getInteger(
                             "jdk.net.ephemeralPortRange."+suffix, -1
@@ -1328,7 +1328,7 @@
      */
 
     public SocketPermissionCollection() {
-        perms = new ArrayList<SocketPermission>();
+        perms = new ArrayList<>();
     }
 
     /**
@@ -1466,7 +1466,7 @@
         // Get the one we want
         @SuppressWarnings("unchecked")
         Vector<SocketPermission> permissions = (Vector<SocketPermission>)gfields.get("permissions", null);
-        perms = new ArrayList<SocketPermission>(permissions.size());
+        perms = new ArrayList<>(permissions.size());
         perms.addAll(permissions);
     }
 }
--- a/src/java.base/share/classes/java/net/SocksSocketImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/SocksSocketImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -82,7 +82,7 @@
     {
         try {
             AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Void>() {
+                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<PasswordAuthentication>() {
+                    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<ProxySelector>() {
+                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<InetAddress>() {
+                        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<ProxySelector>() {
+                new java.security.PrivilegedAction<>() {
                     public ProxySelector run() {
                             return ProxySelector.getDefault();
                         }
@@ -724,7 +724,7 @@
                 // Connects to the SOCKS server
                 try {
                     AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<Void>() {
+                        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<Void>() {
+                    new PrivilegedExceptionAction<>() {
                         public Void run() throws Exception {
                             cmdsock = new Socket(new PlainSocketImpl());
                             cmdsock.connect(new InetSocketAddress(server, serverPort));
--- a/src/java.base/share/classes/java/net/URL.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/URL.java	Thu Apr 23 09:32:35 2015 -0700
@@ -1158,7 +1158,7 @@
 
     private static URLStreamHandler lookupViaProperty(String protocol) {
         String packagePrefixList = java.security.AccessController.doPrivileged(
-                new PrivilegedAction<String>() {
+                new PrivilegedAction<>() {
                     public String run() {
                         return System.getProperty(protocolPathProp, "");
                     }
@@ -1190,7 +1190,7 @@
     }
 
     private static Iterator<URLStreamHandlerProvider> providers() {
-        return new Iterator<URLStreamHandlerProvider>() {
+        return new Iterator<>() {
 
             ClassLoader cl = ClassLoader.getSystemClassLoader();
             ServiceLoader<URLStreamHandlerProvider> sl =
@@ -1243,7 +1243,7 @@
         gate.set(gate);
         try {
             return AccessController.doPrivileged(
-                new PrivilegedAction<URLStreamHandler>() {
+                new PrivilegedAction<>() {
                     public URLStreamHandler run() {
                         Iterator<URLStreamHandlerProvider> itr = providers();
                         while (itr.hasNext()) {
--- a/src/java.base/share/classes/java/net/URLClassLoader.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java	Thu Apr 23 09:32:35 2015 -0700
@@ -359,7 +359,7 @@
         final Class<?> result;
         try {
             result = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Class<?>>() {
+                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<URL>() {
+            new PrivilegedAction<>() {
                 public URL run() {
                     return ucp.findResource(name, true);
                 }
@@ -587,7 +587,7 @@
     {
         final Enumeration<URL> e = ucp.findResources(name, true);
 
-        return new Enumeration<URL>() {
+        return new Enumeration<>() {
             private URL url = null;
 
             private boolean next() {
@@ -596,7 +596,7 @@
                 }
                 do {
                     URL u = AccessController.doPrivileged(
-                        new PrivilegedAction<URL>() {
+                        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<Void>() {
+                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<URLClassLoader>() {
+            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<URLClassLoader>() {
+            new PrivilegedAction<>() {
                 public URLClassLoader run() {
                     return new FactoryURLClassLoader(urls, acc);
                 }
--- a/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Thu Apr 23 09:32:35 2015 -0700
@@ -296,7 +296,7 @@
     public static AsynchronousFileChannel open(Path file, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return open(file, set, null, NO_ATTRIBUTES);
     }
--- a/src/java.base/share/classes/java/nio/channels/FileChannel.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/channels/FileChannel.java	Thu Apr 23 09:32:35 2015 -0700
@@ -330,7 +330,7 @@
     public static FileChannel open(Path path, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return open(path, set, NO_ATTRIBUTES);
     }
--- a/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Thu Apr 23 09:32:35 2015 -0700
@@ -76,7 +76,7 @@
 
         private static AsynchronousChannelProvider load() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<AsynchronousChannelProvider>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     public AsynchronousChannelProvider run() {
                         AsynchronousChannelProvider p;
                         p = loadProviderFromProperty();
--- a/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Thu Apr 23 09:32:35 2015 -0700
@@ -172,7 +172,7 @@
             if (provider != null)
                 return provider;
             return AccessController.doPrivileged(
-                new PrivilegedAction<SelectorProvider>() {
+                new PrivilegedAction<>() {
                     public SelectorProvider run() {
                             if (loadProviderFromProperty())
                                 return provider;
--- a/src/java.base/share/classes/java/nio/charset/Charset.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/charset/Charset.java	Thu Apr 23 09:32:35 2015 -0700
@@ -335,7 +335,7 @@
     // thrown.  Should be invoked with full privileges.
     //
     private static Iterator<CharsetProvider> providers() {
-        return new Iterator<CharsetProvider>() {
+        return new Iterator<>() {
 
                 ClassLoader cl = ClassLoader.getSystemClassLoader();
                 ServiceLoader<CharsetProvider> sl =
@@ -404,7 +404,7 @@
             gate.set(gate);
 
             return AccessController.doPrivileged(
-                new PrivilegedAction<Charset>() {
+                new PrivilegedAction<>() {
                     public Charset run() {
                         for (Iterator<CharsetProvider> i = providers();
                              i.hasNext();) {
@@ -428,7 +428,7 @@
         // returns ExtendedProvider, if installed
         private static CharsetProvider extendedProvider() {
             return AccessController.doPrivileged(
-                       new PrivilegedAction<CharsetProvider>() {
+                       new PrivilegedAction<>() {
                            public CharsetProvider run() {
                                 try {
                                     Class<?> epc
@@ -570,10 +570,10 @@
      */
     public static SortedMap<String,Charset> availableCharsets() {
         return AccessController.doPrivileged(
-            new PrivilegedAction<SortedMap<String,Charset>>() {
+            new PrivilegedAction<>() {
                 public SortedMap<String,Charset> run() {
                     TreeMap<String,Charset> m =
-                        new TreeMap<String,Charset>(
+                        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<String> hs = new HashSet<String>(n);
+        HashSet<String> hs = new HashSet<>(n);
         for (int i = 0; i < n; i++)
             hs.add(aliases[i]);
         aliasSet = Collections.unmodifiableSet(hs);
--- a/src/java.base/share/classes/java/nio/charset/CoderResult.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/charset/CoderResult.java	Thu Apr 23 09:32:35 2015 -0700
@@ -204,13 +204,13 @@
             WeakReference<CoderResult> w;
             CoderResult e = null;
             if (cache == null) {
-                cache = new HashMap<Integer,WeakReference<CoderResult>>();
+                cache = new HashMap<>();
             } else if ((w = cache.get(k)) != null) {
                 e = w.get();
             }
             if (e == null) {
                 e = create(len);
-                cache.put(k, new WeakReference<CoderResult>(e));
+                cache.put(k, new WeakReference<>(e));
             }
             return e;
         }
--- a/src/java.base/share/classes/java/nio/file/FileSystems.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/file/FileSystems.java	Thu Apr 23 09:32:35 2015 -0700
@@ -93,7 +93,7 @@
         private static FileSystem defaultFileSystem() {
             // load default provider
             FileSystemProvider provider = AccessController
-                .doPrivileged(new PrivilegedAction<FileSystemProvider>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     public FileSystemProvider run() {
                         return getDefaultProvider();
                     }
--- a/src/java.base/share/classes/java/nio/file/Files.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/file/Files.java	Thu Apr 23 09:32:35 2015 -0700
@@ -402,7 +402,7 @@
     public static SeekableByteChannel newByteChannel(Path path, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> 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<Path> filter = new DirectoryStream.Filter<Path>() {
+        DirectoryStream.Filter<Path> 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<FileTypeDetector>() {
+                .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<FileTypeDetector> loadInstalledDetectors() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<List<FileTypeDetector>>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     @Override public List<FileTypeDetector> run() {
                         List<FileTypeDetector> list = new ArrayList<>();
                         ServiceLoader<FileTypeDetector> loader = ServiceLoader
@@ -3468,7 +3468,7 @@
             final Iterator<Path> delegate = ds.iterator();
 
             // Re-wrap DirectoryIteratorException to UncheckedIOException
-            Iterator<Path> iterator = new Iterator<Path>() {
+            Iterator<Path> iterator = new Iterator<>() {
                 @Override
                 public boolean hasNext() {
                     try {
--- a/src/java.base/share/classes/java/nio/file/Path.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/file/Path.java	Thu Apr 23 09:32:35 2015 -0700
@@ -801,7 +801,7 @@
      */
     @Override
     default Iterator<Path> iterator() {
-        return new Iterator<Path>() {
+        return new Iterator<>() {
             private int i = 0;
 
             @Override
--- a/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java	Thu Apr 23 09:32:35 2015 -0700
@@ -306,7 +306,7 @@
      * @return the permissions component
      */
     public Set<AclEntryPermission> permissions() {
-        return new HashSet<AclEntryPermission>(perms);
+        return new HashSet<>(perms);
     }
 
     /**
@@ -317,7 +317,7 @@
      * @return the flags component
      */
     public Set<AclEntryFlag> flags() {
-        return new HashSet<AclEntryFlag>(flags);
+        return new HashSet<>(flags);
     }
 
     /**
--- a/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java	Thu Apr 23 09:32:35 2015 -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<PosixFilePermission>(perms);
+        perms = new HashSet<>(perms);
         for (PosixFilePermission p: perms) {
             if (p == null)
                 throw new NullPointerException();
         }
         final Set<PosixFilePermission> value = perms;
-        return new FileAttribute<Set<PosixFilePermission>>() {
+        return new FileAttribute<>() {
             @Override
             public String name() {
                 return "posix:permissions";
--- a/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Thu Apr 23 09:32:35 2015 -0700
@@ -110,7 +110,7 @@
 
     // loads all installed providers
     private static List<FileSystemProvider> loadInstalledProviders() {
-        List<FileSystemProvider> list = new ArrayList<FileSystemProvider>();
+        List<FileSystemProvider> list = new ArrayList<>();
 
         ServiceLoader<FileSystemProvider> sl = ServiceLoader
             .load(FileSystemProvider.class, ClassLoader.getSystemClassLoader());
@@ -163,7 +163,7 @@
                     loadingProviders = true;
 
                     List<FileSystemProvider> list = AccessController
-                        .doPrivileged(new PrivilegedAction<List<FileSystemProvider>>() {
+                        .doPrivileged(new PrivilegedAction<>() {
                             @Override
                             public List<FileSystemProvider> run() {
                                 return loadInstalledProviders();
@@ -419,7 +419,7 @@
         throws IOException
     {
         int len = options.length;
-        Set<OpenOption> opts = new HashSet<OpenOption>(len + 3);
+        Set<OpenOption> opts = new HashSet<>(len + 3);
         if (len == 0) {
             opts.add(StandardOpenOption.CREATE);
             opts.add(StandardOpenOption.TRUNCATE_EXISTING);
--- a/src/java.base/share/classes/java/time/format/DateTimeParseContext.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/time/format/DateTimeParseContext.java	Thu Apr 23 09:32:35 2015 -0700
@@ -399,7 +399,7 @@
      */
     void addChronoChangedListener(Consumer<Chronology> listener) {
         if (chronoListeners == null) {
-            chronoListeners = new ArrayList<Consumer<Chronology>>();
+            chronoListeners = new ArrayList<>();
         }
         chronoListeners.add(listener);
     }
--- a/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java	Thu Apr 23 09:32:35 2015 -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<ZoneRulesProvider> loaded = new ArrayList<>();
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Object run() {
                 String prop = System.getProperty("java.time.zone.DefaultZoneRulesProvider");
                 if (prop != null) {
--- a/src/java.base/share/classes/java/util/Calendar.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/util/Calendar.java	Thu Apr 23 09:32:35 2015 -0700
@@ -3579,7 +3579,7 @@
         ZoneInfo zi = null;
         try {
             zi = AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<ZoneInfo>() {
+                    new PrivilegedExceptionAction<>() {
                         @Override
                         public ZoneInfo run() throws Exception {
                             return (ZoneInfo) input.readObject();
--- a/src/java.base/share/classes/java/util/Currency.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/util/Currency.java	Thu Apr 23 09:32:35 2015 -0700
@@ -212,7 +212,7 @@
     private static final int VALID_FORMAT_VERSION = 2;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 try {
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Thu Apr 23 09:32:35 2015 -0700
@@ -2655,7 +2655,7 @@
                 InputStream stream = null;
                 try {
                     stream = AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<InputStream>() {
+                        new PrivilegedExceptionAction<>() {
                             public InputStream run() throws IOException {
                                 InputStream is = null;
                                 if (reloadFlag) {
--- a/src/java.base/share/classes/java/util/TimeZone.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/util/TimeZone.java	Thu Apr 23 09:32:35 2015 -0700
@@ -678,7 +678,7 @@
         assert tz != null;
 
         final String id = zoneID;
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
                 public Void run() {
                     System.setProperty("user.timezone", id);
--- a/src/java.base/share/classes/java/util/jar/JarFile.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/util/jar/JarFile.java	Thu Apr 23 09:32:35 2015 -0700
@@ -593,7 +593,7 @@
         if (includeUnsigned) {
             return unsignedEntryNames();
         } else {
-            return new Enumeration<String>() {
+            return new Enumeration<>() {
 
                 public boolean hasMoreElements() {
                     return false;
@@ -619,7 +619,7 @@
 
         // screen out entries which are never signed
         final Enumeration<? extends ZipEntry> enum_ = super.entries();
-        return new Enumeration<JarEntry>() {
+        return new Enumeration<>() {
 
             ZipEntry entry;
 
@@ -669,7 +669,7 @@
 
     private Enumeration<String> unsignedEntryNames() {
         final Enumeration<JarEntry> entries = entries();
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
--- a/src/java.base/share/classes/java/util/jar/JarVerifier.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/java/util/jar/JarVerifier.java	Thu Apr 23 09:32:35 2015 -0700
@@ -684,7 +684,7 @@
         final List<CodeSigner[]> signersReq = req;
         final Enumeration<String> enum2 = (matchUnsigned) ? unsignedEntryNames(jar) : emptyEnumeration;
 
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
@@ -726,7 +726,7 @@
         final Map<String, CodeSigner[]> map = new HashMap<>();
         map.putAll(signerMap());
         final Enumeration<? extends ZipEntry> enum_ = e;
-        return new Enumeration<JarEntry>() {
+        return new Enumeration<>() {
 
             Enumeration<String> signers = null;
             JarEntry entry;
@@ -786,7 +786,7 @@
     private Enumeration<String> unsignedEntryNames(JarFile jar) {
         final Map<String, CodeSigner[]> map = signerMap();
         final Enumeration<JarEntry> entries = jar.entries();
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
--- a/src/java.base/share/classes/sun/misc/Cleaner.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/misc/Cleaner.java	Thu Apr 23 09:32:35 2015 -0700
@@ -142,7 +142,7 @@
         try {
             thunk.run();
         } catch (final Throwable x) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         if (System.err != null)
                             new Error("Cleaner terminated abnormally", x)
--- a/src/java.base/share/classes/sun/misc/URLClassPath.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/misc/URLClassPath.java	Thu Apr 23 09:32:35 2015 -0700
@@ -97,16 +97,16 @@
     }
 
     /* The original search path of URLs. */
-    private ArrayList<URL> path = new ArrayList<URL>();
+    private ArrayList<URL> path = new ArrayList<>();
 
     /* The stack of unopened URLs */
-    Stack<URL> urls = new Stack<URL>();
+    Stack<URL> urls = new Stack<>();
 
     /* The resulting search path of Loaders */
-    ArrayList<Loader> loaders = new ArrayList<Loader>();
+    ArrayList<Loader> loaders = new ArrayList<>();
 
     /* Map of each URL opened to its corresponding Loader */
-    HashMap<String, Loader> lmap = new HashMap<String, Loader>();
+    HashMap<String, Loader> 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<IOException> result = new LinkedList<IOException>();
+        List<IOException> result = new LinkedList<>();
         for (Loader loader : loaders) {
             try {
                 loader.close();
@@ -234,7 +234,7 @@
      */
     public Enumeration<URL> findResources(final String name,
                                      final boolean check) {
-        return new Enumeration<URL>() {
+        return new Enumeration<>() {
             private int index = 0;
             private URL url = null;
 
@@ -281,7 +281,7 @@
      */
     public Enumeration<Resource> getResources(final String name,
                                     final boolean check) {
-        return new Enumeration<Resource>() {
+        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<Loader>() {
+                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<Void>() {
+                        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<String> visited = new HashSet<String>();
+            HashSet<String> visited = new HashSet<>();
             return getResource(name, check, visited);
         }
 
@@ -912,7 +912,7 @@
                              * before
                              */
                             newLoader = AccessController.doPrivileged(
-                                new PrivilegedExceptionAction<JarLoader>() {
+                                new PrivilegedExceptionAction<>() {
                                     public JarLoader run() throws IOException {
                                         return new JarLoader(url, handler,
                                             lmap);
--- a/src/java.base/share/classes/sun/net/NetworkClient.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/NetworkClient.java	Thu Apr 23 09:32:35 2015 -0700
@@ -69,7 +69,7 @@
         final String encs[] = { null };
 
         AccessController.doPrivileged(
-                new PrivilegedAction<Void>() {
+                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<Socket>() {
+                    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<InetAddress>() {
+                        new PrivilegedAction<>() {
                             public InetAddress run() {
                                 return serverSocket.getLocalAddress();
 
--- a/src/java.base/share/classes/sun/net/ProgressMonitor.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/ProgressMonitor.java	Thu Apr 23 09:32:35 2015 -0700
@@ -64,7 +64,7 @@
      * Return a snapshot of the ProgressSource list
      */
     public ArrayList<ProgressSource> getProgressSources()    {
-        ArrayList<ProgressSource> snapshot = new ArrayList<ProgressSource>();
+        ArrayList<ProgressSource> snapshot = new ArrayList<>();
 
         try {
             synchronized(progressSourceList)    {
@@ -114,7 +114,7 @@
         if (progressListenerList.size() > 0)
         {
             // Notify progress listener if there is progress change
-            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> 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<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> 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<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> listeners = new ArrayList<>();
 
             // Copy progress listeners to another list to avoid holding locks
             synchronized(progressListenerList)  {
--- a/src/java.base/share/classes/sun/net/www/MessageHeader.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/MessageHeader.java	Thu Apr 23 09:32:35 2015 -0700
@@ -244,7 +244,7 @@
     public synchronized Map<String, List<String>> filterAndAddHeaders(
             String[] excludeList, Map<String, List<String>>  include) {
         boolean skipIt = false;
-        Map<String, List<String>> m = new HashMap<String, List<String>>();
+        Map<String, List<String>> 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<String> l = m.get(keys[i]);
                 if (l == null) {
-                    l = new ArrayList<String>();
+                    l = new ArrayList<>();
                     m.put(keys[i], l);
                 }
                 l.add(values[i]);
@@ -274,7 +274,7 @@
                 for (Map.Entry<String,List<String>> entry: include.entrySet()) {
                 List<String> l = m.get(entry.getKey());
                 if (l == null) {
-                    l = new ArrayList<String>();
+                    l = new ArrayList<>();
                     m.put(entry.getKey(), l);
                 }
                 l.addAll(entry.getValue());
--- a/src/java.base/share/classes/sun/net/www/http/HttpCapture.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/http/HttpCapture.java	Thu Apr 23 09:32:35 2015 -0700
@@ -64,7 +64,7 @@
     private static synchronized void init() {
         initialized = true;
         String rulesFile = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<String>() {
+            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<Pattern>();
-                                capFiles = new ArrayList<String>();
+                                patterns = new ArrayList<>();
+                                capFiles = new ArrayList<>();
                             }
                             patterns.add(Pattern.compile(s[0].trim()));
                             capFiles.add(s[1].trim());
--- a/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Thu Apr 23 09:32:35 2015 -0700
@@ -479,7 +479,7 @@
     {
         try {
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Void>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Void run() throws IOException {
                     openServer(server.getHostString(), server.getPort());
                     return null;
--- a/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Thu Apr 23 09:32:35 2015 -0700
@@ -94,7 +94,7 @@
              */
             final KeepAliveCache cache = this;
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
+                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<KeepAliveKey> keysToRemove
-                    = new ArrayList<KeepAliveKey>();
+                    = new ArrayList<>();
 
                 for (KeepAliveKey key : keySet()) {
                     ClientVector v = get(key);
--- a/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java	Thu Apr 23 09:32:35 2015 -0700
@@ -122,7 +122,7 @@
         this.dontUseNegotiate = dontUseNegotiate;
         rsp = response;
         this.hdrname = hdrname;
-        schemes = new HashMap<String,SchemeMapValue>();
+        schemes = new HashMap<>();
         parse();
     }
 
--- a/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Thu Apr 23 09:32:35 2015 -0700
@@ -62,7 +62,7 @@
 
     static {
         Boolean b = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     return NetProperties.getBoolean(compatPropName);
                 }
--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Apr 23 09:32:35 2015 -0700
@@ -244,7 +244,7 @@
                 new sun.security.action.GetBooleanAction(
                     "sun.net.http.allowRestrictedHeaders")).booleanValue();
         if (!allowRestrictedHeaders) {
-            restrictedHeaderSet = new HashSet<String>(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<PasswordAuthentication>() {
+            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<CookieHandler>() {
+                new java.security.PrivilegedAction<>() {
                 public CookieHandler run() {
                     return CookieHandler.getDefault();
                 }
             });
         }
         cacheHandler = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<ResponseCache>() {
+            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<Void>() {
+            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<String>() {
+                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<Void>() {
+                    new PrivilegedExceptionAction<>() {
                         public Void run() throws IOException {
                             plainConnect0();
                             return null;
@@ -1086,7 +1086,7 @@
                  */
                 ProxySelector sel =
                     java.security.AccessController.doPrivileged(
-                        new java.security.PrivilegedAction<ProxySelector>() {
+                        new java.security.PrivilegedAction<>() {
                             public ProxySelector run() {
                                      return ProxySelector.getDefault();
                                  }
@@ -1245,7 +1245,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<OutputStream>() {
+                    new PrivilegedExceptionAction<>() {
                         public OutputStream run() throws IOException {
                             return getOutputStream0();
                         }
@@ -1423,7 +1423,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<InputStream>() {
+                    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<IOException>() {
+                    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<InetAddress>() {
+                            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<Boolean>() {
+                    new PrivilegedExceptionAction<>() {
                         public Boolean run() throws IOException {
                             return followRedirect0(loc, stat, locUrl0);
                         }
--- a/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Thu Apr 23 09:32:35 2015 -0700
@@ -213,7 +213,7 @@
             /* get the stream before asserting privileges */
             try (final InputStream in = url.openConnection().getInputStream()) {
                 result = AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<JarFile>() {
+                    new PrivilegedExceptionAction<>() {
                         public JarFile run() throws IOException {
                             Path tmpFile = Files.createTempFile("jar_cache", null);
                             try {
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -76,7 +76,7 @@
         this.pool = pool;
 
         if (pool.isFixedThreadPool()) {
-            taskQueue = new ConcurrentLinkedQueue<Runnable>();
+            taskQueue = new ConcurrentLinkedQueue<>();
         } else {
             taskQueue = null;   // not used
         }
@@ -115,7 +115,7 @@
     }
 
     private void startInternalThread(final Runnable task) {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        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<Void>() {
+        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<Void>() {
+                    AccessController.doPrivileged(new PrivilegedAction<>() {
                         @Override
                         public Void run() {
                             delegate.run();
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -228,7 +228,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(2);
+            HashSet<SocketOption<?>> set = new HashSet<>(2);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
             return Collections.unmodifiableSet(set);
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -503,7 +503,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
+            HashSet<SocketOption<?>> set = new HashSet<>(5);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_KEEPALIVE);
--- a/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -294,7 +294,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
+            HashSet<SocketOption<?>> set = new HashSet<>(8);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
--- a/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -184,7 +184,7 @@
 
             // created blocked set if required and add source address
             if (blockedSet == null)
-                blockedSet = new HashSet<InetAddress>();
+                blockedSet = new HashSet<>();
             blockedSet.add(toBlock);
         }
         return this;
--- a/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java	Thu Apr 23 09:32:35 2015 -0700
@@ -84,13 +84,13 @@
         InetAddress group = key.group();
         List<MembershipKeyImpl> keys;
         if (groups == null) {
-            groups = new HashMap<InetAddress,List<MembershipKeyImpl>>();
+            groups = new HashMap<>();
             keys = null;
         } else {
             keys = groups.get(group);
         }
         if (keys == null) {
-            keys = new LinkedList<MembershipKeyImpl>();
+            keys = new LinkedList<>();
             groups.put(group, keys);
         }
         keys.add(key);
--- a/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -52,8 +52,8 @@
 
     protected SelectorImpl(SelectorProvider sp) {
         super(sp);
-        keys = new HashSet<SelectionKey>();
-        selectedKeys = new HashSet<SelectionKey>();
+        keys = new HashSet<>();
+        selectedKeys = new HashSet<>();
         if (Util.atBugLevel("1.4")) {
             publicKeys = keys;
             publicSelectedKeys = selectedKeys;
--- a/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -182,7 +182,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(2);
+            HashSet<SocketOption<?>> set = new HashSet<>(2);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
             set.add(StandardSocketOptions.IP_TOS);
--- a/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -229,7 +229,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
+            HashSet<SocketOption<?>> set = new HashSet<>(8);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_KEEPALIVE);
--- a/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java	Thu Apr 23 09:32:35 2015 -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<CharsetMapping>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
             public CharsetMapping run() {
                 return new CharsetMapping().load(is);
             }
--- a/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java	Thu Apr 23 09:32:35 2015 -0700
@@ -48,7 +48,7 @@
     private boolean shutdown;
 
     protected AbstractPoller() {
-        this.requestList = new LinkedList<Request>();
+        this.requestList = new LinkedList<>();
         this.shutdown = false;
     }
 
@@ -57,7 +57,7 @@
      */
     public void start() {
         final Runnable thisRunnable = this;
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Object run() {
                 Thread thr = new ManagedLocalsThread(thisRunnable);
--- a/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java	Thu Apr 23 09:32:35 2015 -0700
@@ -70,8 +70,8 @@
         this.watcher = watcher;
         this.dir = dir;
         this.state = State.READY;
-        this.events = new ArrayList<WatchEvent<?>>();
-        this.lastModifyEvents = new HashMap<Object,WatchEvent<?>>();
+        this.events = new ArrayList<>();
+        this.lastModifyEvents = new HashMap<>();
     }
 
     final AbstractWatchService watcher() {
@@ -146,7 +146,7 @@
 
             // non-repeated event
             Event<Object> ev =
-                new Event<Object>((WatchEvent.Kind<Object>)kind, context);
+                new Event<>((WatchEvent.Kind<Object>)kind, context);
             if (isModify) {
                 lastModifyEvents.put(context, ev);
             } else if (kind == StandardWatchEventKinds.OVERFLOW) {
@@ -163,7 +163,7 @@
     public final List<WatchEvent<?>> pollEvents() {
         synchronized (this) {
             List<WatchEvent<?>> result = events;
-            events = new ArrayList<WatchEvent<?>>();
+            events = new ArrayList<>();
             lastModifyEvents.clear();
             return result;
         }
--- a/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Thu Apr 23 09:32:35 2015 -0700
@@ -375,7 +375,7 @@
     private static void checkInitted() {
         if (initted) return;
         AccessController.doPrivileged(
-            new PrivilegedAction<Void>() {
+            new PrivilegedAction<>() {
                 public Void run() {
                     // Tests to ensure the system properties table is fully
                     // initialized. This is needed because reflection code is
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Thu Apr 23 09:32:35 2015 -0700
@@ -106,16 +106,16 @@
             throw new IllegalArgumentException("Not an annotation type");
 
         Method[] methods =
-            AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Method[] run() {
                     // Initialize memberTypes and defaultValues
                     return annotationClass.getDeclaredMethods();
                 }
             });
 
-        memberTypes = new HashMap<String,Class<?>>(methods.length+1, 1.0f);
-        memberDefaults = new HashMap<String, Object>(0);
-        members = new HashMap<String, Method>(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)
--- a/src/java.base/share/classes/sun/util/PreHashedMap.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/util/PreHashedMap.java	Thu Apr 23 09:32:35 2015 -0700
@@ -166,14 +166,14 @@
     }
 
     public Set<String> keySet() {
-        return new AbstractSet<String> () {
+        return new AbstractSet<> () {
 
             public int size() {
                 return size;
             }
 
             public Iterator<String> iterator() {
-                return new Iterator<String>() {
+                return new Iterator<>() {
                     private int i = -1;
                     Object[] a = null;
                     String cur = null;
--- a/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Thu Apr 23 09:32:35 2015 -0700
@@ -161,7 +161,7 @@
     private static boolean loggingEnabled;
     static {
         loggingEnabled = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     String cname = System.getProperty("java.util.logging.config.class");
                     String fname = System.getProperty("java.util.logging.config.file");
--- a/src/java.base/share/classes/sun/util/resources/LocaleData.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/util/resources/LocaleData.java	Thu Apr 23 09:32:35 2015 -0700
@@ -159,7 +159,7 @@
     }
 
     public static ResourceBundle getBundle(final String baseName, final Locale locale) {
-        return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
+        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<OpenListResourceBundle>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
            @Override
            public OpenListResourceBundle run() {
                OpenListResourceBundle rb = null;
--- a/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java	Thu Apr 23 09:32:35 2015 -0700
@@ -213,7 +213,7 @@
             if (parent == null) {
                 return set.iterator();
             }
-            return new Iterator<String>() {
+            return new Iterator<>() {
                 private Iterator<String> itr = set.iterator();
                 private boolean usingParent;
 
--- a/src/java.base/unix/classes/java/lang/ProcessEnvironment.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/java/lang/ProcessEnvironment.java	Thu Apr 23 09:32:35 2015 -0700
@@ -99,7 +99,7 @@
 
     /* Only for use by Runtime.exec(...String[]envp...) */
     static Map<String,String> emptyEnvironment(int capacity) {
-        return new StringEnvironment(new HashMap<Variable,Value>(capacity));
+        return new StringEnvironment(new HashMap<>(capacity));
     }
 
     private static native byte[][] environ();
--- a/src/java.base/unix/classes/sun/net/PortConfig.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/net/PortConfig.java	Thu Apr 23 09:32:35 2015 -0700
@@ -42,7 +42,7 @@
 
     static {
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     String os = System.getProperty("os.name");
--- a/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -131,7 +131,7 @@
         // get the name servers from /etc/resolv.conf
         nameservers =
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<LinkedList<String>>() {
+                new java.security.PrivilegedAction<>() {
                     public LinkedList<String> 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<LinkedList<String>>() {
+                 new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         LinkedList<String> ll;
 
@@ -182,7 +182,7 @@
 
         String localDomain = localDomain0();
         if (localDomain != null && localDomain.length() > 0) {
-            sl = new LinkedList<String>();
+            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<LinkedList<String>>() {
+                 new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         LinkedList<String> ll;
 
@@ -260,7 +260,7 @@
 
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Thu Apr 23 09:32:35 2015 -0700
@@ -198,7 +198,7 @@
     {
         Scanner scanner = new Scanner(new File(file));
         try {
-            List<Rule> result = new ArrayList<Rule>();
+            List<Rule> result = new ArrayList<>();
             while (scanner.hasNextLine()) {
                 String line = scanner.nextLine().trim();
 
--- a/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Thu Apr 23 09:32:35 2015 -0700
@@ -95,7 +95,7 @@
     private void init0() {
 
         hostname = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<String>() {
+            new java.security.PrivilegedAction<>() {
             public String run() {
                 String localhost;
                 try {
--- a/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Thu Apr 23 09:32:35 2015 -0700
@@ -216,7 +216,7 @@
         // permission check must always be in initiator's context
         try {
             if (acc != null) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                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<AsynchronousSocketChannel,Object>(this);
+                        result = new PendingFuture<>(this);
                         this.acceptFuture = result;
                     } else {
                         this.acceptHandler = handler;
--- a/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Thu Apr 23 09:32:35 2015 -0700
@@ -93,7 +93,7 @@
     private static native byte[] probeUsingGnomeVfs(long pathAddress);
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Thu Apr 23 09:32:35 2015 -0700
@@ -106,7 +106,7 @@
             synchronized (this) {
                 if (!loaded) {
                     List<String> lines = AccessController.doPrivileged(
-                        new PrivilegedAction<List<String>>() {
+                        new PrivilegedAction<>() {
                             @Override
                             public List<String> run() {
                                 try {
--- a/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java	Thu Apr 23 09:32:35 2015 -0700
@@ -606,7 +606,7 @@
         throws UnixException;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 System.loadLibrary("nio");
--- a/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java	Thu Apr 23 09:32:35 2015 -0700
@@ -222,7 +222,7 @@
             synchronized (loadLock) {
                 if (props == null) {
                     props = AccessController.doPrivileged(
-                        new PrivilegedAction<Properties>() {
+                        new PrivilegedAction<>() {
                             @Override
                             public Properties run() {
                                 return loadProperties();
--- a/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java	Thu Apr 23 09:32:35 2015 -0700
@@ -152,7 +152,7 @@
     public final Iterable<Path> getRootDirectories() {
         final List<Path> allowedList =
            Collections.unmodifiableList(Arrays.asList((Path)rootDirectory));
-        return new Iterable<Path>() {
+        return new Iterable<>() {
             public Iterator<Path> iterator() {
                 try {
                     SecurityManager sm = System.getSecurityManager();
@@ -254,7 +254,7 @@
                 return Collections.emptyList();
             }
         }
-        return new Iterable<FileStore>() {
+        return new Iterable<>() {
             public Iterator<FileStore> iterator() {
                 return new FileStoreIterator();
             }
--- a/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java	Thu Apr 23 09:32:35 2015 -0700
@@ -568,7 +568,7 @@
 
     private static native int init();
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Thu Apr 23 18:01:01 2015 +0800
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Thu Apr 23 09:32:35 2015 -0700
@@ -121,7 +121,7 @@
             ce = Util.jnuEncoding().newEncoder()
                 .onMalformedInput(CodingErrorAction.REPORT)
                 .onUnmappableCharacter(CodingErrorAction.REPORT);
-            encoder.set(new SoftReference<CharsetEncoder>(ce));
+            encoder.set(new SoftReference<>(ce));
         }
 
         char[] ca = fs.normalizeNativePath(input.toCharArray());