directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
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 GMT
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<AVA> 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() );
     }
 
 



Mime
View raw message