directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r912568 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Date Mon, 22 Feb 2010 13:59:42 GMT
Author: elecharny
Date: Mon Feb 22 13:59:42 2010
New Revision: 912568

URL: http://svn.apache.org/viewvc?rev=912568&view=rev
Log:
Avoid excessive checks if the AT value has already been validated.

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

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=912568&r1=912567&r2=912568&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Mon Feb 22 13:59:42 2010
@@ -1234,7 +1234,7 @@
                         for ( Value<?> value : attribute )
                         {
                             // At this point, we know that the attribute's syntax is correct
-                            // We just have to check thaat the current attribute does not

+                            // We just have to check that the current attribute does not

                             // contains the value already
                             if ( currentAttribute.contains( value ))
                             {
@@ -1922,6 +1922,12 @@
             // Then loop on all values
             for ( Value<?> value : attribute )
             {
+                if ( value.isValid() )
+                {
+                    // No need to validate something which is already ok
+                    continue;
+                }
+                
                 try
                 {
                     syntaxChecker.assertSyntax( value.get() );



Mime
View raw message