Separate bug fix to Java runtimes

This commit is contained in:
WalterCouto 2019-12-11 00:40:20 -05:00
parent 31f4dcc7cf
commit f650a0be67
1 changed files with 1 additions and 3 deletions

View File

@ -441,17 +441,15 @@ public class BufferedTokenStream implements TokenStream {
@Override
public String getText() {
fill();
return getText(Interval.of(0,size()-1));
}
@Override
public String getText(Interval interval) {
lazyInit();
int start = interval.a;
int stop = interval.b;
if ( start<0 || stop<0 ) return "";
sync(stop);
fill();
if ( stop>=tokens.size() ) stop = tokens.size()-1;
StringBuilder buf = new StringBuilder();