Open steinybot opened 4 years ago
Should we put our own NPE guard here?
That would be a good idea as a temporary measure. See #461.
@steinybot, how do you think we can proceed? The workaround works, and the PR on ST4 was merged. Can we close it, or is it something else to do? Plus ST4 4.3.1 was released and it was added to giter8 here so technically your fix should now be included.
steps
sbt or Giter8 version: 0.12.1-SNAPSHOT
problem
The root cause is a SYNTAX ERROR:
This is then causing a NPE to be thrown when ST4 tries to report the error.
stack trace
```scala java.lang.NullPointerException at org.stringtemplate.v4.misc.ErrorManager.compileTimeError(ErrorManager.java:100) at org.stringtemplate.v4.compiler.Compiler.reportMessageAndThrowSTException(Compiler.java:205) at org.stringtemplate.v4.compiler.Compiler.compile(Compiler.java:149) at org.stringtemplate.v4.STGroup.compile(STGroup.java:514) at org.stringtemplate.v4.ST.expectation
notes
A guard was put in ST4 a long time ago but it was not put in all the right places: https://github.com/antlr/stringtemplate4/commit/7bff6cf014408927b1db4b92406996172f8442e5