You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
everything works fine when creating a fresh Parser.
However, when I serialize the parser and de-serialize it (successfully without any error), the parse will fail:
Caused by: java.lang.NullPointerException
at org.snt.inmemantlr.memobjects.MemoryByteCode.getBytes(MemoryByteCode.java:92)
at org.snt.inmemantlr.comp.SpecialClassLoader.findClass(SpecialClassLoader.java:65)
at org.snt.inmemantlr.comp.StringCompiler.findClass(StringCompiler.java:152)
at org.snt.inmemantlr.comp.StringCompiler.instanciateLexer(StringCompiler.java:181)
at org.snt.inmemantlr.GenericParser.parse(GenericParser.java:526)
at org.snt.inmemantlr.GenericParser.parse(GenericParser.java:420)
at com.manticore.jsqlformatter.JavaTools.formatJava(JavaTools.java:153)
... 1 more
Hi Julian,
everything works fine when creating a fresh Parser.
However, when I serialize the parser and de-serialize it (successfully without any error), the parse will fail:
Shortened Java Code
Before I have serialized the Parser like shown below:
The Parser is correct and works fine when I create it afresh.
But it fails with the NPE when loading it from the file.
I have the File java_grammar.out attached:
java_grammar.zip
The text was updated successfully, but these errors were encountered: