Use StringBuilder instead of StringBuffer
This commit is contained in:
parent
2056e019a5
commit
6259ab5c9e
|
@ -385,7 +385,7 @@ public class Grammar implements AttributeResolver {
|
|||
List<Grammar> grammarsFromRootToMe = getOutermostGrammar().getGrammarAncestors();
|
||||
String qualifiedName = name;
|
||||
if ( grammarsFromRootToMe!=null ) {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (Grammar g : grammarsFromRootToMe) {
|
||||
buf.append(g.name);
|
||||
buf.append('_');
|
||||
|
|
|
@ -775,7 +775,7 @@ public abstract class BaseTest {
|
|||
}
|
||||
|
||||
public static class StreamVacuum implements Runnable {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
BufferedReader in;
|
||||
Thread sucker;
|
||||
public StreamVacuum(InputStream in) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class TestFastQueue {
|
|||
q.add("c");
|
||||
q.add("d");
|
||||
q.add("e");
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
while ( q.size()>0 ) {
|
||||
String o = q.remove();
|
||||
buf.append(o);
|
||||
|
@ -67,7 +67,7 @@ public class TestFastQueue {
|
|||
}
|
||||
|
||||
@Test public void testQueueThenRemoveOneByOne() throws Exception {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
FastQueue<String> q = new FastQueue<String>();
|
||||
q.add("a");
|
||||
buf.append(q.remove());
|
||||
|
|
Loading…
Reference in New Issue