diff options
author | aclement <aclement> | 2005-02-08 14:45:25 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-02-08 14:45:25 +0000 |
commit | 06a9daf851f6eb793a44c32a7b94e7c9c4768d8c (patch) | |
tree | 0393fbdd231ca977651b1d963f39c1425174486c /ajde | |
parent | cc6a37364a6eac962de2f3af693898bfc2cec9c5 (diff) | |
download | aspectj-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.java | 7 |
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) { |