aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2021-11-30 07:35:20 -0800
committerGitHub <noreply@github.com>2021-11-30 07:35:20 -0800
commit5abc2f1dce1e97b92acc5562b3c5fa32cf0abb5d (patch)
treef7ffca6959b94577ba07ff8f190c5b8568c357d0 /taskdefs
parent27aba3f4dfb18600f6b83e8cdf4e268d63d48ec0 (diff)
parentb1c52e2f5eb624037b8c799c20fbd1b4fd611d9a (diff)
downloadaspectj-5abc2f1dce1e97b92acc5562b3c5fa32cf0abb5d.tar.gz
aspectj-5abc2f1dce1e97b92acc5562b3c5fa32cf0abb5d.zip
Merge pull request #101 from turbanoff/use_StringBuilder_instead_of_StringBuffer
Replace uses of StringBuffer with StringBuilder.
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 a515f8e78..c0c50ed99 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");
}