From b1c52e2f5eb624037b8c799c20fbd1b4fd611d9a Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Sat, 20 Nov 2021 17:16:22 +0300 Subject: Replace uses of StringBuffer with StringBuilder. StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance. --- ajde/src/main/java/org/aspectj/ajde/Ajde.java | 2 +- .../main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ajde') diff --git a/ajde/src/main/java/org/aspectj/ajde/Ajde.java b/ajde/src/main/java/org/aspectj/ajde/Ajde.java index 3eef4fd06..5977feb16 100644 --- a/ajde/src/main/java/org/aspectj/ajde/Ajde.java +++ b/ajde/src/main/java/org/aspectj/ajde/Ajde.java @@ -258,7 +258,7 @@ public class Ajde { if (LangUtil.isEmpty(mainClass)) { showWarningMessage("No main class specified"); } else { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); List outputDirs = compilerConfig.getOutputLocationManager().getAllOutputLocations(); for (Object outputDir : outputDirs) { File dir = (File) outputDir; 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 8e409b4d9..5b83060b8 100644 --- a/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java +++ b/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigFileUpdater.java @@ -185,7 +185,7 @@ class LstBuildConfigFileUpdater { */ public void writeConfigFile(String filePath, List fileContents) { Set contentsSet = new TreeSet<>(fileContents); - StringBuffer fileContentsSB = new StringBuffer(); + StringBuilder fileContentsSB = new StringBuilder(); for (String s : contentsSet) { fileContentsSB.append(s.toString()); fileContentsSB.append("\n"); -- cgit v1.2.3