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. --- .../main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java | 2 +- ajde.core/src/test/java/org/aspectj/ajde/core/tests/AjConfigTest.java | 2 +- .../test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ajde.core') diff --git a/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java b/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java index d98f26462..47f402cd4 100644 --- a/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java +++ b/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java @@ -175,7 +175,7 @@ public class AjdeCoreBuildManager { return "none"; } - StringBuffer formattedOptions = new StringBuffer(); + StringBuilder formattedOptions = new StringBuilder(); for (Object option : options) { String o = option.toString(); if (formattedOptions.length() > 0) { diff --git a/ajde.core/src/test/java/org/aspectj/ajde/core/tests/AjConfigTest.java b/ajde.core/src/test/java/org/aspectj/ajde/core/tests/AjConfigTest.java index e9acb3ae8..928106960 100644 --- a/ajde.core/src/test/java/org/aspectj/ajde/core/tests/AjConfigTest.java +++ b/ajde.core/src/test/java/org/aspectj/ajde/core/tests/AjConfigTest.java @@ -145,7 +145,7 @@ public class AjConfigTest extends AjdeCoreTestCase { public void testClasspath() { String classpath = compilerConfig.getClasspath(); List found = genAjBuildConfig().getClasspath(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (Iterator iterator = found.iterator(); iterator.hasNext();) { String name = iterator.next(); sb.append(name); diff --git a/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java b/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java index 543f70e2d..563f08666 100644 --- a/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java +++ b/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java @@ -394,7 +394,7 @@ public class ShowWeaveMessagesTest extends AjdeCoreTestCase { } private String stringify(List l) { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); for (String str: l) { result.append(str); result.append("\n"); -- cgit v1.2.3