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/test/java/org/opends/server/TestCaseUtils.java |   26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java b/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
index 602c4b2..ac129e3 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
@@ -553,7 +553,7 @@
     }
   }
 
-  private static List<Long> restartTimesMs = new ArrayList<Long>();
+  private static List<Long> restartTimesMs = new ArrayList<>();
   public static List<Long> getRestartTimesMs() {
     return Collections.unmodifiableList(restartTimesMs);
   }
@@ -914,7 +914,7 @@
       RootContainer rootContainer = backend.getRootContainer();
       for (EntryContainer ec : rootContainer.getEntryContainers())
       {
-        List<DatabaseContainer> databases = new ArrayList<DatabaseContainer>();
+        List<DatabaseContainer> databases = new ArrayList<>();
         ec.listDatabases(databases);
         for (DatabaseContainer dbContainer: databases) {
           if (dbContainer instanceof Index) {
@@ -1152,7 +1152,7 @@
     ldifImportConfig.setValidateSchema(false);
     LDIFReader reader = new LDIFReader(ldifImportConfig);
 
-    List<Entry> entries = new ArrayList<Entry>();
+    List<Entry> entries = new ArrayList<>();
     Entry entry;
     while ((entry = reader.readEntry()) != null) {
       entries.add(entry);
@@ -1522,7 +1522,7 @@
    */
   public static Map<String, String> makeMap(String... keyValuePairs)
   {
-    Map<String, String> map = new LinkedHashMap<String, String>();
+    Map<String, String> map = new LinkedHashMap<>();
     for (int i = 0; i < keyValuePairs.length; i += 2) {
       map.put(keyValuePairs[i], keyValuePairs[i+1]);
     }
@@ -1534,7 +1534,7 @@
   // ---------------------------------------------------------------------------
 
   /** The set of loggers for which the console logger has been disabled. */
-  private static final Map<Logger, Handler> disabledLogHandlers = new HashMap<Logger,Handler>();
+  private static final Map<Logger, Handler> disabledLogHandlers = new HashMap<>();
 
   /** The original System.err print stream.  Use this if you absolutely
    *  must write something to System.err. */
@@ -1692,15 +1692,10 @@
    * included).  An ArrayList is explicitly returned, so that callers know that
    * random access is not expensive.
    */
-  public static ArrayList<String> readFileToLines(File file)
-          throws IOException {
-    BufferedReader reader =
-      new BufferedReader(
-        new InputStreamReader(
-          new DataInputStream(
-                  new FileInputStream(file))));
+  public static ArrayList<String> readFileToLines(File file) throws IOException {
+    BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
 
-    ArrayList<String> lines = new ArrayList<String>();
+    ArrayList<String> lines = new ArrayList<>();
     String line;
     while ((line = reader.readLine()) != null)   {
       lines.add(line);
@@ -1848,8 +1843,7 @@
 
 
     // Re-arrange all of the elements by thread ID so that there is some logical order.
-    Map<Long, Map.Entry<Thread, StackTraceElement[]>> orderedStacks =
-         new TreeMap<Long,Map.Entry<Thread,StackTraceElement[]>>();
+    Map<Long, Map.Entry<Thread, StackTraceElement[]>> orderedStacks = new TreeMap<>();
     for (Map.Entry<Thread,StackTraceElement[]> e : threadStacks.entrySet())
     {
       orderedStacks.put(e.getKey().getId(), e);
@@ -1930,7 +1924,7 @@
 
   public static HashSet<PluginType> getPluginTypes(Entry e)
   {
-    HashSet<PluginType> pluginTypes = new HashSet<PluginType>();
+    HashSet<PluginType> pluginTypes = new HashSet<>();
     List<Attribute> attrList = e.getAttribute("ds-cfg-plugin-type");
     if (attrList != null)
     {

--
Gitblit v1.10.0