< prev index next >

src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java

Print this page

        

@@ -74,11 +74,11 @@
     {
         super(provider);
         this.pool = pool;
 
         if (pool.isFixedThreadPool()) {
-            taskQueue = new ConcurrentLinkedQueue<Runnable>();
+            taskQueue = new ConcurrentLinkedQueue<>();
         } else {
             taskQueue = null;   // not used
         }
 
         // use default thread factory as thread should not be visible to

@@ -113,11 +113,11 @@
             }
         };
     }
 
     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
                 // cannot use user-supplied thread factory
                 ThreadPool.defaultThreadFactory().newThread(task).start();

@@ -244,11 +244,11 @@
      * Shutdown all tasks waiting for I/O events.
      */
     abstract void shutdownHandlerTasks();
 
     private void shutdownExecutors() {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 pool.executor().shutdown();
                 timeoutExecutor.shutdown();
                 return null;
             }

@@ -321,11 +321,11 @@
             final AccessControlContext acc = AccessController.getContext();
             final Runnable delegate = task;
             task = new Runnable() {
                 @Override
                 public void run() {
-                    AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                    AccessController.doPrivileged(new PrivilegedAction<>() {
                         @Override
                         public Void run() {
                             delegate.run();
                             return null;
                         }
< prev index next >