Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in ErrorManager.compileTimeError #253

Closed
steinybot opened this issue Apr 18, 2020 · 0 comments · Fixed by #254
Closed

NullPointerException in ErrorManager.compileTimeError #253

steinybot opened this issue Apr 18, 2020 · 0 comments · Fixed by #254
Labels

Comments

@steinybot
Copy link
Contributor

The CommonToken constructor org.antlr.runtime.CommonToken#CommonToken(int, java.lang.String) does not set input and so it has a default value of null.

There are a couple of places in org.stringtemplate.v4.misc.ErrorManager which do not check for null when calling org.antlr.runtime.Token#getInputStream.

There was a guard put in one of the compileTimeError methods but not the other 2 overloads. See
7bff6cf

I encountered this in foundweekends/giter8#460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants