From 7662842520cb3458930035dd726d5c18e8cfd31a Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 01 Feb 2016 08:06:49 +0000
Subject: [PATCH] Replaced server's AttributeDescriptions.create(AttributeType, Set<String>) by SDK's AttributeDescription.create(AttributeType, Collection<String>)
---
opendj-server-legacy/src/main/java/org/opends/server/types/AttributeDescriptions.java | 21 +--------------------
opendj-server-legacy/src/main/java/org/opends/server/api/CompressedSchema.java | 2 +-
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalAttributeValue.java | 3 +--
3 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/api/CompressedSchema.java b/opendj-server-legacy/src/main/java/org/opends/server/api/CompressedSchema.java
index be0c658..39518f5 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/api/CompressedSchema.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/api/CompressedSchema.java
@@ -555,7 +555,7 @@
{
final AttributeType type = DirectoryServer.getAttributeType(attributeName);
final Set<String> options = getOptions(attributeOptions);
- final AttributeDescription ad = AttributeDescriptions.create(type, options);
+ final AttributeDescription ad = AttributeDescription.create(type, options);
exclusiveLock.lock();
try
{
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalAttributeValue.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalAttributeValue.java
index e2682c2..9623552 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalAttributeValue.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalAttributeValue.java
@@ -41,7 +41,6 @@
import org.opends.server.replication.common.CSN;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeBuilder;
-import org.opends.server.types.AttributeDescriptions;
import org.opends.server.types.Modification;
/**
@@ -138,7 +137,7 @@
isModDN = true;
}
}
- this.attrDesc = attrType != null ? AttributeDescriptions.create(attrType, options) : null;
+ this.attrDesc = attrType != null ? AttributeDescription.create(attrType, options) : null;
csn = new CSN(token[1]);
histKey = HistAttrModificationKey.decodeKey(token[2]);
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/types/AttributeDescriptions.java b/opendj-server-legacy/src/main/java/org/opends/server/types/AttributeDescriptions.java
index 14f8c19..0cfed30 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/types/AttributeDescriptions.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/types/AttributeDescriptions.java
@@ -24,10 +24,7 @@
*/
package org.opends.server.types;
-import java.util.Set;
-
import org.forgerock.opendj.ldap.AttributeDescription;
-import org.forgerock.opendj.ldap.schema.AttributeType;
/** Temporary class until we move fully to {@link AttributeDescription}. */
public class AttributeDescriptions
@@ -49,22 +46,6 @@
*/
public static AttributeDescription create(Attribute attr)
{
- return create(attr.getAttributeType(), attr.getOptions());
- }
-
- /**
- * Creates an attribute description having the provided attribute type and options.
- *
- * @param attributeType
- * The attribute type.
- * @param options
- * The attribute options.
- * @return The attribute description.
- * @throws NullPointerException
- * If {@code attributeType} or {@code options} was {@code null}.
- */
- public static AttributeDescription create(AttributeType attributeType, Set<String> options)
- {
- return AttributeDescription.create(attributeType, options.toArray(new String[options.size()]));
+ return AttributeDescription.create(attr.getAttributeType(), attr.getOptions());
}
}
--
Gitblit v1.10.0