From a89f7014aeb71dba5c94404dfea7eb89e7eeee74 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 08 Jul 2015 06:48:02 +0000
Subject: [PATCH] AutoRefactor'ed Use Diamond Operator

---
 opendj-server-legacy/src/main/java/org/opends/server/extensions/TraditionalWorkQueue.java |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/extensions/TraditionalWorkQueue.java b/opendj-server-legacy/src/main/java/org/opends/server/extensions/TraditionalWorkQueue.java
index caa270a..18d6ba5 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/extensions/TraditionalWorkQueue.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/extensions/TraditionalWorkQueue.java
@@ -73,13 +73,9 @@
   private static final int MAX_RETRY_COUNT = 5;
 
   /** The set of worker threads that will be used to process this work queue. */
-  private final ArrayList<TraditionalWorkerThread> workerThreads =
-    new ArrayList<TraditionalWorkerThread>();
+  private final ArrayList<TraditionalWorkerThread> workerThreads = new ArrayList<>();
 
-  /**
-   * The number of operations that have been submitted to the work queue for
-   * processing.
-   */
+  /** The number of operations that have been submitted to the work queue for processing. */
   private AtomicLong opsSubmitted;
 
   /**
@@ -180,13 +176,13 @@
       // Create the actual work queue.
       if (maxCapacity > 0)
       {
-        opQueue = new LinkedBlockingQueue<Operation>(maxCapacity);
+        opQueue = new LinkedBlockingQueue<>(maxCapacity);
       }
       else
       {
         // This will never be the case, since the configuration definition
         // ensures that the capacity is always finite.
-        opQueue = new LinkedBlockingQueue<Operation>();
+        opQueue = new LinkedBlockingQueue<>();
       }
 
       // Create the set of worker threads that should be used to service the
@@ -241,7 +237,7 @@
     // Send responses to any operations in the pending queue to indicate that
     // they won't be processed because the server is shutting down.
     CancelRequest cancelRequest = new CancelRequest(true, reason);
-    ArrayList<Operation> pendingOperations = new ArrayList<Operation>();
+    ArrayList<Operation> pendingOperations = new ArrayList<>();
     opQueue.removeAll(pendingOperations);
     for (Operation o : pendingOperations)
     {
@@ -710,12 +706,11 @@
         LinkedBlockingQueue<Operation> newOpQueue = null;
         if (newMaxCapacity > 0)
         {
-          newOpQueue = new LinkedBlockingQueue<Operation>(
-              newMaxCapacity);
+          newOpQueue = new LinkedBlockingQueue<>(newMaxCapacity);
         }
         else
         {
-          newOpQueue = new LinkedBlockingQueue<Operation>();
+          newOpQueue = new LinkedBlockingQueue<>();
         }
 
         oldOpQueue = opQueue;

--
Gitblit v1.10.0