From commits-return-25739-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Sat May 08 11:58:55 2010 Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 87593 invoked from network); 8 May 2010 11:58:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 May 2010 11:58:55 -0000 Received: (qmail 55552 invoked by uid 500); 8 May 2010 11:58:55 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 55497 invoked by uid 500); 8 May 2010 11:58:55 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 55488 invoked by uid 99); 8 May 2010 11:58:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 May 2010 11:58:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 May 2010 11:58:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6C06723889BF; Sat, 8 May 2010 11:57:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942371 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Date: Sat, 08 May 2010 11:57:55 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100508115755.6C06723889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Sat May 8 11:57:55 2010 New Revision: 942371 URL: http://svn.apache.org/viewvc?rev=942371&view=rev Log: One more optimization : if the DN is already normalized, no need to do it again. Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=942371&r1=942370&r2=942371&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Sat May 8 11:57:55 2010 @@ -188,7 +188,12 @@ public class NormalizationInterceptor ex */ public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext opContext ) throws Exception { - opContext.getDn().normalize( schemaManager.getNormalizerMapping() ); + DN dn = opContext.getDn(); + + if ( !dn.isNormalized() ) + { + dn.normalize( schemaManager.getNormalizerMapping() ); + } ExprNode filter = opContext.getFilter();