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/protocols/ldap/LDAPAttribute.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPAttribute.java b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPAttribute.java
index d07e732..b9b4a95 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPAttribute.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPAttribute.java
@@ -27,6 +27,7 @@
package org.opends.server.protocols.ldap;
import static org.opends.messages.ProtocolMessages.*;
+import static org.opends.server.util.CollectionUtils.*;
import static org.opends.server.util.ServerConstants.*;
import java.util.ArrayList;
@@ -34,8 +35,11 @@
import java.util.List;
import org.forgerock.i18n.LocalizableMessage;
-import org.opends.server.types.*;
import org.forgerock.opendj.ldap.ByteString;
+import org.opends.server.types.Attribute;
+import org.opends.server.types.AttributeBuilder;
+import org.opends.server.types.LDAPException;
+import org.opends.server.types.RawAttribute;
/**
* This class defines the data structures and methods to use when interacting
@@ -77,8 +81,7 @@
{
this.attributeType = attributeType;
- values = new ArrayList<>(1);
- values.add(ByteString.valueOf(value));
+ values = newArrayList(ByteString.valueOf(value));
}
@@ -93,8 +96,7 @@
{
this.attributeType = attributeType;
- values = new ArrayList<>(1);
- values.add(value);
+ values = newArrayList(value);
}
--
Gitblit v1.10.0