From 5cd7bdbbda0fa9f1aa6e12d9171c3811b73feb07 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 09 Jul 2015 14:01:31 +0000
Subject: [PATCH] Code cleanup

---
 opendj-server-legacy/src/main/java/org/opends/server/config/BooleanConfigAttribute.java |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/config/BooleanConfigAttribute.java b/opendj-server-legacy/src/main/java/org/opends/server/config/BooleanConfigAttribute.java
index 641f414..c2f9dec 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/config/BooleanConfigAttribute.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/config/BooleanConfigAttribute.java
@@ -28,7 +28,6 @@
 
 import org.forgerock.i18n.LocalizableMessage;
 
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -44,6 +43,7 @@
 
 import static org.opends.server.config.ConfigConstants.*;
 import static org.opends.messages.ConfigMessages.*;
+import static org.opends.server.util.CollectionUtils.*;
 import static org.opends.server.util.ServerConstants.*;
 
 /**
@@ -357,7 +357,7 @@
    */
   public List<String> activeValuesToStrings()
   {
-    return asList(String.valueOf(activeValue));
+    return newArrayList(String.valueOf(activeValue));
   }
 
   /**
@@ -375,18 +375,11 @@
   {
     if (hasPendingValues())
     {
-      return asList(String.valueOf(pendingValue));
+      return newArrayList(String.valueOf(pendingValue));
     }
     return null;
   }
 
-  private List<String> asList(String s)
-  {
-    ArrayList<String> result = new ArrayList<>(1);
-    result.add(s);
-    return result;
-  }
-
   /**
    * Retrieves a new configuration attribute of this type that will contain the
    * values from the provided attribute.

--
Gitblit v1.10.0