Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 10360 invoked from network); 6 Jun 2010 08:42:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Jun 2010 08:42:06 -0000 Received: (qmail 45753 invoked by uid 500); 6 Jun 2010 08:42:06 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 45700 invoked by uid 500); 6 Jun 2010 08:42:06 -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 45689 invoked by uid 99); 6 Jun 2010 08:42:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jun 2010 08:42:05 +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; Sun, 06 Jun 2010 08:42:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4CB2523889EA; Sun, 6 Jun 2010 08:41:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r951841 - /directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Date: Sun, 06 Jun 2010 08:41:42 -0000 To: commits@directory.apache.org From: felixk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100606084142.4CB2523889EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: felixk Date: Sun Jun 6 08:41:41 2010 New Revision: 951841 URL: http://svn.apache.org/viewvc?rev=951841&view=rev Log: Use StringBuffer for string concatenation Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=951841&r1=951840&r2=951841&view=diff ============================================================================== --- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java (original) +++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Sun Jun 6 08:41:41 2010 @@ -579,7 +579,7 @@ public class LdifPartition extends BTree */ private String getFileName( RDN rdn ) throws LdapException { - String fileName = ""; + StringBuffer fileName = new StringBuffer( "" ); Iterator iterator = rdn.iterator(); while ( iterator.hasNext() ) @@ -595,15 +595,15 @@ public class LdifPartition extends BTree // Now, get the normalized value String normValue = ava.getNormValue().getString(); - fileName += atName + "=" + normValue; + fileName.append( atName ).append( "=" ).append( normValue ); if ( iterator.hasNext() ) { - fileName += "+"; + fileName.append( "+" ); } } - return getOSFileName( fileName ); + return getOSFileName( fileName.toString() ); }