directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r506167 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
Date Sun, 11 Feb 2007 23:25:07 GMT
Author: akarasulu
Date: Sun Feb 11 15:25:06 2007
New Revision: 506167

URL: http://svn.apache.org/viewvc?view=rev&rev=506167
Log:
make sure a syntaxChecker exists for the syntax before allowing it to be added

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java?view=diff&rev=506167&r1=506166&r2=506167
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/MetaSyntaxHandler.java
Sun Feb 11 15:25:06 2007
@@ -271,6 +271,14 @@
     {
         Schema schema = loader.getSchema( syntax.getSchema() );
         
+        if ( ! this.targetRegistries.getSyntaxCheckerRegistry().hasSyntaxChecker( syntax.getOid()
) )
+        {
+            throw new LdapOperationNotSupportedException(
+                "Cannot permit the addition of a syntax without the prior creation of a "
+
+                "\nsyntaxChecker with the same object identifier of the syntax!",
+                ResultCodeEnum.UNWILLING_TO_PERFORM );
+        }
+        
         if ( ! schema.isDisabled() )
         {
             syntaxRegistry.register( syntax );



Mime
View raw message