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

Jean-Noël Rouvignac
08.34.2016 a3c93828f847345ed67fda0cddf1089d8fb433d5
opendj-server-legacy/src/main/java/org/opends/server/admin/DNPropertyDefinition.java
@@ -17,16 +17,12 @@
package org.opends.server.admin;
import static org.forgerock.util.Reject.ifNull;
import java.util.EnumSet;
import org.forgerock.i18n.LocalizedIllegalArgumentException;
import org.forgerock.opendj.ldap.DN;
import org.opends.server.types.DirectoryException;
/**
 * DN property definition.
@@ -76,15 +72,7 @@
     */
    public void setBaseDN(String baseDN)
        throws IllegalArgumentException {
      if (baseDN == null) {
        setBaseDN((DN) null);
      } else {
        try {
          setBaseDN(DN.valueOf(baseDN));
        } catch (DirectoryException e) {
          throw new IllegalArgumentException(e);
        }
      }
      setBaseDN(baseDN != null ? DN.valueOf(baseDN) : null);
    }
@@ -177,9 +165,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public DN decodeValue(String value)
      throws PropertyException {
@@ -189,14 +174,11 @@
      DN dn = DN.valueOf(value);
      validateValue(dn);
      return dn;
    } catch (DirectoryException | PropertyException e) {
    } catch (LocalizedIllegalArgumentException | PropertyException e) {
      throw PropertyException.illegalPropertyValueException(this, value);
    }
  }
  /** {@inheritDoc} */
  @Override
  public <R, P> R accept(PropertyDefinitionVisitor<R, P> v, P p) {
    return v.visitDN(this, p);