diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2021-12-05 23:23:51 +0300 |
---|---|---|
committer | Andrey Turbanov <turbanoff@gmail.com> | 2021-12-05 23:23:51 +0300 |
commit | 80e0c5adc8f534bee0914c5f9e4b82ce417aaf69 (patch) | |
tree | 70f7f54d6b858ae510c6d4488f6c2e792f00478b /bcel-builder | |
parent | 7a10203a7c9c846b6778c269cb529242b893149d (diff) | |
download | aspectj-80e0c5adc8f534bee0914c5f9e4b82ce417aaf69.tar.gz aspectj-80e0c5adc8f534bee0914c5f9e4b82ce417aaf69.zip |
Replace more usages of StringBuffer with StringBuilder
Diffstat (limited to 'bcel-builder')
-rw-r--r-- | bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/Signature.java | 6 | ||||
-rw-r--r-- | bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/GenericSignatureParsingTest.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/Signature.java b/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/Signature.java index 96236c8f3..a9a9b1a92 100644 --- a/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/Signature.java +++ b/bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/Signature.java @@ -183,7 +183,7 @@ public final class Signature extends Attribute { return ch == 'T' || ch == 'L'; } - private static final void matchIdent(MyByteArrayInputStream in, StringBuffer buf) { + private static final void matchIdent(MyByteArrayInputStream in, StringBuilder buf) { int ch; if ((ch = in.read()) == -1) @@ -234,7 +234,7 @@ public final class Signature extends Attribute { in.unread(); } - private static final void matchGJIdent(MyByteArrayInputStream in, StringBuffer buf) { + private static final void matchGJIdent(MyByteArrayInputStream in, StringBuilder buf) { int ch; matchIdent(in, buf); @@ -274,7 +274,7 @@ public final class Signature extends Attribute { public static String translate(String s) { // System.out.println("Sig:" + s); - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); matchGJIdent(new MyByteArrayInputStream(s), buf); diff --git a/bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/GenericSignatureParsingTest.java b/bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/GenericSignatureParsingTest.java index f1d06c265..2b2b5eb46 100644 --- a/bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/GenericSignatureParsingTest.java +++ b/bcel-builder/src/test/java/org/aspectj/apache/bcel/classfile/tests/GenericSignatureParsingTest.java @@ -153,7 +153,7 @@ public class GenericSignatureParsingTest extends BcelTestCase { // These routines call BCEL to determine if it can correctly translate from one form to the other. private void checkClassTypeSignature(String sig, String expected) { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); int p = GenericSignatureParsingTest.readClassTypeSignatureFrom(sig,0,result,false); assertTrue("Only swallowed "+p+" chars of this sig "+sig+" (len="+sig.length()+")",p==sig.length()); assertTrue("Expected '"+expected+"' but got '"+result.toString()+"'",result.toString().equals(expected)); @@ -204,7 +204,7 @@ public class GenericSignatureParsingTest extends BcelTestCase { * * FIXME asc this should also create some kind of object you can query for information about whether its parameterized, what the bounds are, etc... */ - public static final int readClassTypeSignatureFrom(String signature, int posn, StringBuffer result, boolean chopit) { + public static final int readClassTypeSignatureFrom(String signature, int posn, StringBuilder result, boolean chopit) { int idx = posn; try { switch (signature.charAt(idx)) { @@ -282,7 +282,7 @@ public class GenericSignatureParsingTest extends BcelTestCase { public static final String readClassTypeSignatureFrom(String signature) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); GenericSignatureParsingTest.readClassTypeSignatureFrom(signature,0,sb,false); return sb.toString(); } |