Closed fmela closed 9 years ago
This error occurs within a rarely used, largely undocumented portion of the runtime library (throwing non-standard RecognitionException
exceptions and expecting the error handler to handle them). At least for now, you must call RecognitionException.setOffendingToken
with a non-null Token
instance prior to throwing the exception.
I'm open to suggestions for a long-term solution for this, but keep in mind removing the @NotNull
annotation from the offendingToken
argument to notifyErrorListeners
would be a breaking change that we want to avoid if at all possible.
Hi. Not sure how offendingToken could ever be null. Does this happen for you still in 4.5? I'm closing as it's likely something altering normal error mechanism.
I no longer have access to the source code that triggered this, but maybe @benmccann could test with 4.5 and comment.
ok, thanks.
I am using ANTLR 4.6 and have the same problem. You can reproduce if you try the following
> git clone git@github.com:buschmais/jqa-json-plugin.git
> git checkout antlr-fails-with-npe
> mvn clean install -P IT
To cope the problem I currently have to examine the strack trace and to suppress the NPE caused by ANTLR.
thanks @obfischer !
Hi @parrt, is there any progress on this issue?
Nope. :( Working on ST4 release.
I understand. May be the label status:not-fixing
could be removed. Indeed I am not sure of its meaning.
Well, i removed though I'm not sure if we can actually change anything per @sharwell above. can you paste the small example that causes issue?
I will do it on the weekend. Today is time to go to bed...
Looks to be happening here.