@ -22,12 +22,11 @@ import org.springframework.lang.Nullable;
@@ -22,12 +22,11 @@ import org.springframework.lang.Nullable;
/ * *
* Simple { @link ArrayDeque } - based structure for tracking the logical position during
* a parsing process . { @link Entry entries } are added to the LinkedList a t
* each point during the parse phase in a reader - specific manner .
* a parsing process . { @link Entry entries } are added to the ArrayDeque at each poin t
* during the parse phase in a reader - specific manner .
*
* < p > Calling { @link # toString ( ) } will render a tree - style view of the current logical
* position in the parse phase . This representation is intended for use in
* error messages .
* position in the parse phase . This representation is intended for use in error messages .
*
* @author Rob Harrop
* @author Juergen Hoeller
@ -35,11 +34,6 @@ import org.springframework.lang.Nullable;
@@ -35,11 +34,6 @@ import org.springframework.lang.Nullable;
* /
public final class ParseState {
/ * *
* Tab character used when rendering the tree - style representation .
* /
private static final char TAB = '\t' ;
/ * *
* Internal { @link ArrayDeque } storage .
* /
@ -54,8 +48,8 @@ public final class ParseState {
@@ -54,8 +48,8 @@ public final class ParseState {
}
/ * *
* Create a new { @code ParseState } whose { @link ArrayDeque } is a { @link Object # clone clone }
* of that of the passed in { @code ParseState } .
* Create a new { @code ParseState } whose { @link ArrayDeque } is a clone
* of the state in the passed - in { @code ParseState } .
* /
private ParseState ( ParseState other ) {
this . state = other . state . clone ( ) ;
@ -99,13 +93,13 @@ public final class ParseState {
@@ -99,13 +93,13 @@ public final class ParseState {
* /
@Override
public String toString ( ) {
StringBuilder sb = new StringBuilder ( ) ;
StringBuilder sb = new StringBuilder ( 64 ) ;
int i = 0 ;
for ( ParseState . Entry entry : this . state ) {
if ( i > 0 ) {
sb . append ( '\n' ) ;
for ( int j = 0 ; j < i ; j + + ) {
sb . append ( TAB ) ;
sb . append ( '\t' ) ;
}
sb . append ( "-> " ) ;
}