From 80e0c5adc8f534bee0914c5f9e4b82ce417aaf69 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Sun, 5 Dec 2021 23:23:51 +0300 Subject: Replace more usages of StringBuffer with StringBuilder --- util/src/main/java/org/aspectj/util/GenericSignatureParser.java | 4 ++-- util/src/main/java/org/aspectj/util/LangUtil.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/src/main/java/org/aspectj/util/GenericSignatureParser.java b/util/src/main/java/org/aspectj/util/GenericSignatureParser.java index 101984cb6..3f1f3d52a 100644 --- a/util/src/main/java/org/aspectj/util/GenericSignatureParser.java +++ b/util/src/main/java/org/aspectj/util/GenericSignatureParser.java @@ -176,7 +176,7 @@ public class GenericSignatureParser { private ClassTypeSignature parseClassTypeSignature() { SimpleClassTypeSignature outerType = null; SimpleClassTypeSignature[] nestedTypes = new SimpleClassTypeSignature[0]; - StringBuffer ret = new StringBuffer(); + StringBuilder ret = new StringBuilder(); String identifier = eatIdentifier(); ret.append(identifier); while (maybeEat("/")) { @@ -215,7 +215,7 @@ public class GenericSignatureParser { * Helper method to digest nested types, slightly more complex than necessary to cope with some android related * incorrect classes (see bug 406167) */ - private SimpleClassTypeSignature[] parseNestedTypesHelper(StringBuffer ret) { + private SimpleClassTypeSignature[] parseNestedTypesHelper(StringBuilder ret) { boolean brokenSignature = false; SimpleClassTypeSignature[] nestedTypes; List nestedTypeList = new ArrayList<>(); diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java index bea034d87..28cf2f708 100644 --- a/util/src/main/java/org/aspectj/util/LangUtil.java +++ b/util/src/main/java/org/aspectj/util/LangUtil.java @@ -1510,7 +1510,7 @@ public class LangUtil { @Override public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); append(sb, fromProcess, "process"); append(sb, fromOutPipe, " stdout"); append(sb, fromErrPipe, " stderr"); @@ -1522,7 +1522,7 @@ public class LangUtil { } } - private void append(StringBuffer sb, Throwable thrown, String label) { + private void append(StringBuilder sb, Throwable thrown, String label) { if (null != thrown) { sb.append("from " + label + ": "); sb.append(LangUtil.renderExceptionShort(thrown)); -- cgit v1.2.3