change cast to null chk (Coverity)

This commit is contained in:
Terence Parr 2013-08-31 17:08:25 -07:00
parent 3e53c0c61d
commit d0b9e7388c
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ public class DefaultErrorStrategy implements ANTLRErrorStrategy {
{
TokenStream tokens = recognizer.getInputStream();
String input;
if (tokens instanceof TokenStream) {
if ( tokens!=null ) {
if ( e.getStartToken().getType()==Token.EOF ) input = "<EOF>";
else input = tokens.getText(e.getStartToken(), e.getOffendingToken());
}