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

neil_a_wilson
15.13.2006 8189be351446d10ce1480eef75683c9c16144fa1
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.

OpenDS Issue Number: 1109
1 files modified
5 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java 5 ●●●●● patch | view | raw | blame | history
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());
        }