From 8189be351446d10ce1480eef75683c9c16144fa1 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 15 Dec 2006 20:13:43 +0000
Subject: [PATCH] Change the behavior of the objectclass syntax if it encounters an undefined superior class while parsing an objectclass definition.  It will now create an empty objectclass with the specified name to use as the superior class rather than silently replacing it with "top".  This will make it possible to detect and reject the undefined superior class downstream if necessary.

---
 opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
index 1af9544..d6fd0d5 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
@@ -595,14 +595,15 @@
         {
           // This is bad because we don't know what the superior objectclass
           // is so we can't base this objectclass on it.  Log a message and
-          // just go with the top objectclass.
+          // just create a default empty superior class.
           int    msgID   = MSGID_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_SUPERIOR_CLASS;
           String message = getMessage(msgID, String.valueOf(oid),
                                       String.valueOf(woidBuffer));
           logError(ErrorLogCategory.SCHEMA, ErrorLogSeverity.SEVERE_WARNING,
                    message, msgID);
 
-          superiorClass = DirectoryServer.getTopObjectClass();
+          superiorClass =
+               DirectoryServer.getDefaultObjectClass(woidBuffer.toString());
         }
 
 

--
Gitblit v1.10.0