From 7a48c327a34c8f6ba655d4803601d7d71d683eb0 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 01 Jul 2016 12:53:43 +0000
Subject: [PATCH] OPENDJ-2956 Issue warnings during schema validation of a matching rule use if it references obsolete elements

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
index 9576fd0..07d1692 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/SchemaBackend.java
+++ b/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)

--
Gitblit v1.10.0