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

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromFile.java |   24 +++++++++++-------------
 1 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromFile.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromFile.java
index 5859072..11819c2 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromFile.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromFile.java
@@ -105,10 +105,10 @@
    */
   public void readConfiguration()
   {
-    final List<OpenDsException> errors = new ArrayList<OpenDsException>();
-    final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<ConnectionHandlerDescriptor>();
-    final Set<BackendDescriptor> backendDescriptors = new HashSet<BackendDescriptor>();
-    final Set<DN> alternateBindDNs = new HashSet<DN>();
+    final List<OpenDsException> errors = new ArrayList<>();
+    final Set<ConnectionHandlerDescriptor> connectionHandlers = new HashSet<>();
+    final Set<BackendDescriptor> backendDescriptors = new HashSet<>();
+    final Set<DN> alternateBindDNs = new HashSet<>();
     try
     {
       DirectoryServer.getInstance().initializeConfiguration();
@@ -220,15 +220,15 @@
       try
       {
         final BackendCfg backend = root.getBackend(backendName);
-        final Set<BaseDNDescriptor> baseDNs = new HashSet<BaseDNDescriptor>();
+        final Set<BaseDNDescriptor> baseDNs = new HashSet<>();
         for (final DN dn : backend.getBaseDN())
         {
           final BaseDNDescriptor baseDN =
               new BaseDNDescriptor(BaseDNDescriptor.Type.NOT_REPLICATED, dn, null, -1, -1, -1);
           baseDNs.add(baseDN);
         }
-        final Set<IndexDescriptor> indexes = new HashSet<IndexDescriptor>();
-        final Set<VLVIndexDescriptor> vlvIndexes = new HashSet<VLVIndexDescriptor>();
+        final Set<IndexDescriptor> indexes = new HashSet<>();
+        final Set<VLVIndexDescriptor> vlvIndexes = new HashSet<>();
         BackendDescriptor.Type type;
         if (backend instanceof LocalDBBackendCfg)
         {
@@ -482,15 +482,14 @@
   private ConnectionHandlerDescriptor getConnectionHandler(final ConnectionHandlerCfg connHandler, final String name)
       throws OpenDsException
   {
-    final SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator());
-    int port;
-
-    ConnectionHandlerDescriptor.Protocol protocol;
+    final SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator());
 
     final ConnectionHandlerDescriptor.State state =
         connHandler.isEnabled() ? ConnectionHandlerDescriptor.State.ENABLED
             : ConnectionHandlerDescriptor.State.DISABLED;
 
+    ConnectionHandlerDescriptor.Protocol protocol;
+    int port;
     if (connHandler instanceof LDAPConnectionHandlerCfg)
     {
       final LDAPConnectionHandlerCfg ldap = (LDAPConnectionHandlerCfg) connHandler;
@@ -569,10 +568,9 @@
   private ConnectionHandlerDescriptor getConnectionHandler(final AdministrationConnectorCfg adminConnector)
       throws OpenDsException
   {
-    final SortedSet<InetAddress> addresses = new TreeSet<InetAddress>(getInetAddressComparator());
+    final SortedSet<InetAddress> addresses = new TreeSet<>(getInetAddressComparator());
 
     final ConnectionHandlerDescriptor.Protocol protocol = ConnectionHandlerDescriptor.Protocol.ADMINISTRATION_CONNECTOR;
-
     final ConnectionHandlerDescriptor.State state = ConnectionHandlerDescriptor.State.ENABLED;
 
     addAll(addresses, adminConnector.getListenAddress());

--
Gitblit v1.10.0