aboutsummaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authoraclement <aclement>2005-02-08 14:45:25 +0000
committeraclement <aclement>2005-02-08 14:45:25 +0000
commit06a9daf851f6eb793a44c32a7b94e7c9c4768d8c (patch)
tree0393fbdd231ca977651b1d963f39c1425174486c /ajde
parentcc6a37364a6eac962de2f3af693898bfc2cec9c5 (diff)
downloadaspectj-06a9daf851f6eb793a44c32a7b94e7c9c4768d8c.tar.gz
aspectj-06a9daf851f6eb793a44c32a7b94e7c9c4768d8c.zip
Performance optimization - use stringbuffer (found using xray)
Diffstat (limited to 'ajde')
-rw-r--r--ajde/src/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/ajde/src/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java b/ajde/src/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java
index 443ef41dc..0ef831aad 100644
--- a/ajde/src/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java
+++ b/ajde/src/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java
@@ -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) {