mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
01.04.2016 7662842520cb3458930035dd726d5c18e8cfd31a
Replaced server's AttributeDescriptions.create(AttributeType, Set<String>) by SDK's AttributeDescription.create(AttributeType, Collection<String>)
3 files modified
26 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/api/CompressedSchema.java 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/HistoricalAttributeValue.java 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/types/AttributeDescriptions.java 21 ●●●●● patch | view | raw | blame | history
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
    {
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]);
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());
  }
}