aboutsummaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
Diffstat (limited to 'ajde')
-rw-r--r--ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java12
-rw-r--r--ajde/src/main/java/org/aspectj/ajde/ui/internal/UserPreferencesStore.java6
2 files changed, 9 insertions, 9 deletions
diff --git a/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java b/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java
index 5b83060b8..fd2940c32 100644
--- a/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java
+++ b/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java
@@ -117,11 +117,11 @@ class LstBuildConfigFileUpdater {
public void writeConfigFile(String filePath, List<BuildConfigNode> files, List<BuildConfigNode> importedNodes) {
// Set contentsSet = new TreeSet(fileContents);
- String fileContentsString = "";
+ StringBuilder fileContentsString = new StringBuilder();
// List filesToWrite = null;
Set<String> includedFiles = new HashSet<>();
for (BuildConfigNode node : importedNodes) {
- fileContentsString += '@' + node.getResourcePath() + "\n";
+ fileContentsString.append('@').append(node.getResourcePath()).append("\n");
String parentPath = new File(filePath).getParent();
String importedFilePath = parentPath + File.separator + node.getResourcePath();
includedFiles.addAll(getIncludedFiles(importedFilePath, parentPath));
@@ -129,15 +129,15 @@ class LstBuildConfigFileUpdater {
for (BuildConfigNode node : files) {
if (node.getName().endsWith(".lst") && !node.getResourcePath().startsWith("..")) {
- fileContentsString += '@';
- fileContentsString += node.getResourcePath() + "\n";
+ fileContentsString.append('@');
+ fileContentsString.append(node.getResourcePath()).append("\n");
} else {
if (!includedFiles.contains(node.getResourcePath())) {
- fileContentsString += node.getResourcePath() + "\n";
+ fileContentsString.append(node.getResourcePath()).append("\n");
}
}
}
- writeFile(fileContentsString, filePath);
+ writeFile(fileContentsString.toString(), filePath);
}
private List<String> getIncludedFiles(String path, String rootPath) {
diff --git a/ajde/src/main/java/org/aspectj/ajde/ui/internal/UserPreferencesStore.java b/ajde/src/main/java/org/aspectj/ajde/ui/internal/UserPreferencesStore.java
index b8dc93332..d774dadee 100644
--- a/ajde/src/main/java/org/aspectj/ajde/ui/internal/UserPreferencesStore.java
+++ b/ajde/src/main/java/org/aspectj/ajde/ui/internal/UserPreferencesStore.java
@@ -74,11 +74,11 @@ public class UserPreferencesStore implements UserPreferencesAdapter {
@Override
public void setProjectMultivalPreference(String name, List values) {
- String valuesString = "";
+ StringBuilder valuesString = new StringBuilder();
for (Object value : values) {
- valuesString += (String) value + ';';
+ valuesString.append((String)value).append(';');
}
- properties.setProperty(name, valuesString);
+ properties.setProperty(name, valuesString.toString());
saveProperties();
}