aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/src/main/java/org/aspectj/util/FileUtil.java4
-rw-r--r--util/src/main/java/org/aspectj/util/GenericSignature.java10
-rw-r--r--util/src/main/java/org/aspectj/util/GenericSignatureParser.java20
-rw-r--r--util/src/main/java/org/aspectj/util/LangUtil.java6
-rw-r--r--util/src/test/java/org/aspectj/util/FileUtilTest.java4
-rw-r--r--util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java2
6 files changed, 23 insertions, 23 deletions
diff --git a/util/src/main/java/org/aspectj/util/FileUtil.java b/util/src/main/java/org/aspectj/util/FileUtil.java
index cf798617d..c572e5950 100644
--- a/util/src/main/java/org/aspectj/util/FileUtil.java
+++ b/util/src/main/java/org/aspectj/util/FileUtil.java
@@ -336,7 +336,7 @@ public class FileUtil {
if (null == infix) {
infix = File.pathSeparator;
}
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
boolean first = true;
for (String path : paths) {
if (null == path) {
@@ -1131,7 +1131,7 @@ public class FileUtil {
*/
public static String readAsString(File file) throws IOException {
BufferedReader r = new BufferedReader(new FileReader(file));
- StringBuffer b = new StringBuffer();
+ StringBuilder b = new StringBuilder();
while (true) {
int ch = r.read();
if (ch == -1) {
diff --git a/util/src/main/java/org/aspectj/util/GenericSignature.java b/util/src/main/java/org/aspectj/util/GenericSignature.java
index f128ba4a5..e68a78b7e 100644
--- a/util/src/main/java/org/aspectj/util/GenericSignature.java
+++ b/util/src/main/java/org/aspectj/util/GenericSignature.java
@@ -27,7 +27,7 @@ public class GenericSignature {
public ClassTypeSignature[] superInterfaceSignatures = ClassTypeSignature.NONE;
public String toString() {
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
ret.append(formalTypeParameters.toString());
ret.append(superclassSignature.toString());
for (ClassTypeSignature superInterfaceSignature : superInterfaceSignatures) {
@@ -52,7 +52,7 @@ public class GenericSignature {
}
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (formalTypeParameters.length > 0) {
sb.append("<");
for (FormalTypeParameter formalTypeParameter : formalTypeParameters) {
@@ -84,7 +84,7 @@ public class GenericSignature {
public FieldTypeSignature[] interfaceBounds;
public String toString() {
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
ret.append("T");
ret.append(identifier);
ret.append(":");
@@ -208,7 +208,7 @@ public class GenericSignature {
}
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(identifier);
if (typeArguments.length > 0) {
sb.append("<");
@@ -240,7 +240,7 @@ public class GenericSignature {
public String toString() {
if (isWildcard)
return "*";
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (isPlus)
sb.append("+");
if (isMinus)
diff --git a/util/src/main/java/org/aspectj/util/GenericSignatureParser.java b/util/src/main/java/org/aspectj/util/GenericSignatureParser.java
index ba45ecc99..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<SimpleClassTypeSignature> nestedTypeList = new ArrayList<>();
@@ -318,7 +318,7 @@ public class GenericSignatureParser {
char[] chars = signatureString.toCharArray();
int index = 0;
List<String> tokens = new ArrayList<>();
- StringBuffer identifier = new StringBuffer();
+ StringBuilder identifier = new StringBuilder();
boolean inParens = false;
boolean inArray = false;
boolean couldSeePrimitive = false;
@@ -327,32 +327,32 @@ public class GenericSignatureParser {
case '<':
if (identifier.length() > 0)
tokens.add(identifier.toString());
- identifier = new StringBuffer();
+ identifier = new StringBuilder();
tokens.add("<");
break;
case '>':
if (identifier.length() > 0)
tokens.add(identifier.toString());
- identifier = new StringBuffer();
+ identifier = new StringBuilder();
tokens.add(">");
break;
case ':':
if (identifier.length() > 0)
tokens.add(identifier.toString());
- identifier = new StringBuffer();
+ identifier = new StringBuilder();
tokens.add(":");
break;
case '/':
if (identifier.length() > 0)
tokens.add(identifier.toString());
- identifier = new StringBuffer();
+ identifier = new StringBuilder();
tokens.add("/");
couldSeePrimitive = false;
break;
case ';':
if (identifier.length() > 0)
tokens.add(identifier.toString());
- identifier = new StringBuffer();
+ identifier = new StringBuilder();
tokens.add(";");
couldSeePrimitive = true;
inArray = false;
@@ -360,7 +360,7 @@ public class GenericSignatureParser {
case '^':
if (identifier.length() > 0)
tokens.add(identifier.toString());
- identifier = new StringBuffer();
+ identifier = new StringBuilder();
tokens.add("^");
break;
case '+':
@@ -375,7 +375,7 @@ public class GenericSignatureParser {
case '.':
if (identifier.length() > 0)
tokens.add(identifier.toString());
- identifier = new StringBuffer();
+ identifier = new StringBuilder();
couldSeePrimitive = false;
tokens.add(".");
break;
diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java
index cfe9a0bea..af1e21d29 100644
--- a/util/src/main/java/org/aspectj/util/LangUtil.java
+++ b/util/src/main/java/org/aspectj/util/LangUtil.java
@@ -805,7 +805,7 @@ public class LangUtil {
if (LangUtil.isEmpty(in) || LangUtil.isEmpty(sought)) {
return in;
}
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
final int len = sought.length();
int start = 0;
int loc;
@@ -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));
diff --git a/util/src/test/java/org/aspectj/util/FileUtilTest.java b/util/src/test/java/org/aspectj/util/FileUtilTest.java
index 3bd1ef4e4..e6ab241cc 100644
--- a/util/src/test/java/org/aspectj/util/FileUtilTest.java
+++ b/util/src/test/java/org/aspectj/util/FileUtilTest.java
@@ -487,7 +487,7 @@ public class FileUtilTest extends TestCase {
final String prefix = new File(tempDir, "testLineSeek").getPath();
// setup files 0..MAX with 2*MAX lines
String[] sources = new String[MAX];
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < sources.length; i++) {
sources[i] = new File(prefix + i).getPath();
sb.append("not matched");
@@ -604,7 +604,7 @@ public class FileUtilTest extends TestCase {
public void testPipe() {
String str = "The quick brown fox jumped over the lazy dog";
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < 4096; i++) {
sb.append(str);
}
diff --git a/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java b/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java
index e336392e3..bad45fe65 100644
--- a/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java
+++ b/util/src/test/java/org/aspectj/util/GenericSignatureParserTest.java
@@ -216,7 +216,7 @@ public class GenericSignatureParserTest extends TestCase {
}
private String tokensToString(String[] tokens) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(tokens[0]);
for (int i = 1; i < tokens.length; i++) {
sb.append(",");