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

Nicolas Capponi
28.26.2016 7a48c327a34c8f6ba655d4803601d7d71d683eb0
opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
@@ -67,7 +67,6 @@
import org.forgerock.opendj.ldap.schema.CoreSchema;
import org.forgerock.opendj.ldap.schema.DITContentRule;
import org.forgerock.opendj.ldap.schema.DITStructureRule;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import org.forgerock.opendj.ldap.schema.MatchingRuleUse;
import org.forgerock.opendj.ldap.schema.NameForm;
import org.forgerock.opendj.ldap.schema.ObjectClass;
@@ -1830,25 +1829,6 @@
      }
    }
    // Obsolete matching rule and attribute types are not checked by the SDK
    MatchingRule matchingRule = matchingRuleUse.getMatchingRule();
    if (matchingRule.isObsolete())
    {
      LocalizableMessage message = ERR_SCHEMA_MODIFY_MRU_OBSOLETE_MR.get(
          matchingRuleUse.getNameOrOID(), matchingRule.getNameOrOID());
      throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message);
    }
    for (AttributeType at : matchingRuleUse.getAttributes())
    {
      if (at.isObsolete())
      {
        LocalizableMessage message = ERR_SCHEMA_MODIFY_MRU_OBSOLETE_ATTR.get(
            matchingRuleUse.getNameOrOID(), matchingRule.getNameOrOID());
        throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message);
      }
    }
    // If there is no existing matching rule use, then we're adding a new one.
    // Otherwise, we're replacing an existing matching rule use.
    if (existingMRU == null)