You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/02/22 14:59:42 UTC
svn commit: r912568 -
/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
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() );