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/tools/ImportLDIF.java |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
index 6622f51..bfaf117 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/ImportLDIF.java
@@ -570,14 +570,14 @@
 
   private ArrayList<ByteString> toByteStrings(String value)
   {
-    final ArrayList<ByteString> values = new ArrayList<ByteString>(1);
+    final ArrayList<ByteString> values = new ArrayList<>(1);
     values.add(ByteString.valueOf(value));
     return values;
   }
 
   private ArrayList<ByteString> toByteStrings(List<String> attrValues)
   {
-    final ArrayList<ByteString> values = new ArrayList<ByteString>(attrValues.size());
+    final ArrayList<ByteString> values = new ArrayList<>(attrValues.size());
     for (String includeBranche : attrValues)
     {
       values.add(ByteString.valueOf(includeBranche));
@@ -713,7 +713,7 @@
       // Initialize the plugin manager.
       try
       {
-        HashSet<PluginType> pluginTypes = new HashSet<PluginType>(1);
+        HashSet<PluginType> pluginTypes = new HashSet<>(1);
         directoryServer.initializePlugins(pluginTypes);
       }
       catch (Exception e)
@@ -752,7 +752,7 @@
     // Make sure that the plugin initialization is performed.
     try
     {
-      HashSet<PluginType> pluginTypes = new HashSet<PluginType>(1);
+      HashSet<PluginType> pluginTypes = new HashSet<>(1);
       pluginTypes.add(PluginType.LDIF_IMPORT);
       PluginConfigManager pluginConfigManager =
               DirectoryServer.getPluginConfigManager();
@@ -776,7 +776,7 @@
     }
     else
     {
-      excludeAttributes = new HashSet<AttributeType>();
+      excludeAttributes = new HashSet<>();
       for (String attrName : excludeAttributeStrings.getValues())
       {
         String        lowerName = attrName.toLowerCase();
@@ -810,7 +810,7 @@
     }
     else
     {
-      includeAttributes = new HashSet<AttributeType>();
+      includeAttributes = new HashSet<>();
       for (String attrName : includeAttributeStrings.getValues())
       {
         String        lowerName = attrName.toLowerCase();
@@ -842,7 +842,7 @@
     }
     else
     {
-      excludeFilters = new ArrayList<SearchFilter>();
+      excludeFilters = new ArrayList<>();
       for (String filterString : excludeFilterStrings.getValues())
       {
         try
@@ -869,7 +869,7 @@
     }
     else
     {
-      includeFilters = new ArrayList<SearchFilter>();
+      includeFilters = new ArrayList<>();
       for (String filterString : includeFilterStrings.getValues())
       {
         try
@@ -896,8 +896,8 @@
     // excluded from the import.
     Backend<?> backend = null;
     Set<DN> defaultIncludeBranches = null;
-    Set<DN> excludeBranches = new HashSet<DN>();
-    Set<DN> includeBranches = new HashSet<DN>();
+    Set<DN> excludeBranches = new HashSet<>();
+    Set<DN> includeBranches = new HashSet<>();
 
     if (includeBranchStrings.isPresent())
     {
@@ -923,9 +923,9 @@
       }
     }
 
-    ArrayList<Backend>     backendList = new ArrayList<Backend>();
-    ArrayList<BackendCfg>  entryList   = new ArrayList<BackendCfg>();
-    ArrayList<List<DN>> dnList = new ArrayList<List<DN>>();
+    ArrayList<Backend>     backendList = new ArrayList<>();
+    ArrayList<BackendCfg>  entryList   = new ArrayList<>();
+    ArrayList<List<DN>> dnList = new ArrayList<>();
     int code = BackendToolUtils.getBackends(backendList, entryList, dnList);
     if (code != 0)
     {
@@ -955,7 +955,7 @@
       if (backend == null)
       {
         backend                = b;
-        defaultIncludeBranches = new HashSet<DN>(dnList.get(i));
+        defaultIncludeBranches = new HashSet<>(dnList.get(i));
       }
       else
       {
@@ -1051,7 +1051,7 @@
     LDIFImportConfig importConfig;
     if (ldifFiles.isPresent())
     {
-      ArrayList<String> fileList = new ArrayList<String>(ldifFiles.getValues());
+      ArrayList<String> fileList = new ArrayList<>(ldifFiles.getValues());
       int badFileCount = 0;
       for (String pathname : fileList)
       {
@@ -1073,7 +1073,7 @@
                             PATH_MAKELDIF_RESOURCE_DIR;
       TemplateFile tf = new TemplateFile(resourcePath, random);
 
-      ArrayList<LocalizableMessage> warnings = new ArrayList<LocalizableMessage>();
+      ArrayList<LocalizableMessage> warnings = new ArrayList<>();
       try
       {
         tf.parse(templateFile.getValue(), warnings);

--
Gitblit v1.10.0