Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 68648 invoked from network); 10 Jan 2007 16:32:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jan 2007 16:32:44 -0000 Received: (qmail 87458 invoked by uid 500); 10 Jan 2007 16:32:51 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 87433 invoked by uid 500); 10 Jan 2007 16:32:51 -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 87422 invoked by uid 99); 10 Jan 2007 16:32:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 08:32:51 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 08:32:43 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id E76731A981A; Wed, 10 Jan 2007 08:31:43 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r494880 - /directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Date: Wed, 10 Jan 2007 16:31:43 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070110163143.E76731A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Wed Jan 10 08:31:43 2007 New Revision: 494880 URL: http://svn.apache.org/viewvc?view=rev&rev=494880 Log: Used the dn.isNormalized to avoid a costly normalization Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?view=diff&rev=494880&r1=494879&r2=494880 ============================================================================== --- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java (original) +++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Wed Jan 10 08:31:43 2007 @@ -25,7 +25,6 @@ import java.util.Map; import java.util.Set; -import javax.naming.Name; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attribute; @@ -102,9 +101,15 @@ * @param retAttrs array or attribute type to be specifically included in the result entry(s) * @throws NamingException if there are problems accessing subentries */ - private void addCollectiveAttributes( Name name, Attributes entry, String[] retAttrs ) throws NamingException + private void addCollectiveAttributes( LdapDN name, Attributes entry, String[] retAttrs ) throws NamingException { - LdapDN normName = LdapDN.normalize( ( LdapDN ) name, registry.getNormalizerMapping() ); + LdapDN normName = name; + + if ( !name.isNormalized() ) + { + normName = LdapDN.normalize( name, registry.getNormalizerMapping() ); + } + Attributes entryWithCAS = nexus.lookup( normName, new String[] { COLLECTIVE_ATTRIBUTE_SUBENTRIES } ); Attribute caSubentries = entryWithCAS.get( COLLECTIVE_ATTRIBUTE_SUBENTRIES );