aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs
diff options
context:
space:
mode:
authorAndrey Turbanov <turbanoff@gmail.com>2021-11-20 17:16:22 +0300
committerAndrey Turbanov <turbanoff@gmail.com>2021-11-20 17:22:06 +0300
commitb1c52e2f5eb624037b8c799c20fbd1b4fd611d9a (patch)
tree33d7b6e8f733f20514f46e7871b29e26de47913d /taskdefs
parent0f85ca109b9e6ab849e201e76f62d5023cbfcb98 (diff)
downloadaspectj-b1c52e2f5eb624037b8c799c20fbd1b4fd611d9a.tar.gz
aspectj-b1c52e2f5eb624037b8c799c20fbd1b4fd611d9a.zip
Replace uses of StringBuffer with StringBuilder.
StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance.
Diffstat (limited to 'taskdefs')
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc10.java2
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java6
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc10.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc10.java
index ae50afe8e..b4eb1f020 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc10.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc10.java
@@ -566,7 +566,7 @@ public class Ajc10 extends MatchingTask {
/** utility to render String[] for logging */
public static String render(String[] args) {
if (null == args) return "";
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (String arg : args) {
sb.append(arg);
sb.append(" ");
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
index 218fc56d5..d9e4b6427 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
@@ -439,7 +439,7 @@ public class AjcTask extends MatchingTask {
}
protected String validCommaList(String list, List valid, String label, int max) {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
StringTokenizer st = new StringTokenizer(list, ",");
int num = 0;
while (st.hasMoreTokens()) {
@@ -1253,7 +1253,7 @@ public class AjcTask extends MatchingTask {
* @throws BuildException if options conflict
*/
protected void verifyOptions() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (fork && isInIncrementalMode() && !isInIncrementalFileMode()) {
sb.append("can fork incremental only using tag file.\n");
}
@@ -1333,7 +1333,7 @@ public class AjcTask extends MatchingTask {
{
IMessage[] fails = holder.getMessages(IMessage.FAIL, true);
if (!LangUtil.isEmpty(fails)) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
String prefix = "fail due to ";
int numThrown = 0;
for (IMessage fail : fails) {
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
index db9687ed1..e64080968 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
@@ -190,7 +190,7 @@ public class Ajc extends DefaultCompilerAdapter {
// Same behavior as DefaultCompilerAdapter.logAndAddFilesToCompile
attributes.log("Compilation args: " + cmd.toString(), Project.MSG_VERBOSE);
- StringBuffer niceSourceList = new StringBuffer("File");
+ StringBuilder niceSourceList = new StringBuilder("File");
if (compileList.length != 1) {
niceSourceList.append("s");
}