From 57eb76aab3e54835868678b328adedf41704a030 Mon Sep 17 00:00:00 2001 From: sharwell Date: Thu, 17 Nov 2011 18:26:46 -0800 Subject: [PATCH] v4: StringBuilder instead of StringBuffer [git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9357] --- runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java index 76baa52b2..c19123752 100644 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java @@ -143,7 +143,7 @@ public class ATNConfig { } public String toString(Recognizer recog, boolean showAlt) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); // if ( state.ruleIndex>=0 ) { // if ( recog!=null ) buf.append(recog.getRuleNames()[state.ruleIndex]+":"); // else buf.append(state.ruleIndex+":"); @@ -158,7 +158,7 @@ public class ATNConfig { buf.append(context); } if ( reachesIntoOuterContext>0 ) { - buf.append("|up="+reachesIntoOuterContext); + buf.append("|up=").append(reachesIntoOuterContext); } // if (isAccept) { // buf.append("|=>"+alt);