]> source.dussan.org Git - aspectj.git/commitdiff
Performance optimization - use stringbuffer (found using xray)
authoraclement <aclement>
Tue, 8 Feb 2005 14:45:25 +0000 (14:45 +0000)
committeraclement <aclement>
Tue, 8 Feb 2005 14:45:25 +0000 (14:45 +0000)
ajde/src/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java

index 443ef41dc38706d279e05ad32fdf6fc71717db92..0ef831aad7c8a361777cdd80d19741b4e3c5af69 100644 (file)
@@ -185,12 +185,13 @@ class LstBuildConfigFileUpdater {
      */
     public void writeConfigFile(String filePath, List fileContents) {
         Set contentsSet = new TreeSet(fileContents);
-        String fileContentsString = "";
+        StringBuffer fileContentsSB = new StringBuffer();
         Iterator it = contentsSet.iterator();
         while (it.hasNext()) {
-            fileContentsString += it.next().toString() + "\n";
+               fileContentsSB.append(it.next().toString());
+               fileContentsSB.append("\n");
         }
-        writeFile(fileContentsString, filePath);
+        writeFile(fileContentsSB.toString(), filePath);
     }
     
     private void writeFile(String contents, String filePath) {