lishunli / projectlombok

Automatically exported from code.google.com/p/projectlombok
0 stars 0 forks source link

error: Lombok visitor handler class lombok.javac.handlers.HandleVal failed: java.lang.NullPointerException #543

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I use Lombok 0.11.8 and attached test file
Kubuntu 13.04

# javac -cp lombok.jar Test.java

Result is:

Exception while resolving: NODE LOCAL (class 
com.sun.tools.javac.tree.JCTree$JCVariableDecl) @val()
final java.lang.Object res = super.get(i)
java.lang.NullPointerException
        at com.sun.tools.javac.comp.Check$Validator.visitTypeApply(Check.java:1066)
        at com.sun.tools.javac.tree.JCTree$JCTypeApply.accept(JCTree.java:1866)
        at com.sun.tools.javac.comp.Check$Validator.validateTree(Check.java:1150)
        at com.sun.tools.javac.comp.Check.validate(Check.java:1038)
        at com.sun.tools.javac.comp.Check.validate(Check.java:1035)
        at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:859)
        at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:725)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
        at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
        at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:480)
        at lombok.javac.JavacResolution.attrib(JavacResolution.java:364)
        at lombok.javac.JavacResolution.resolveMethodMember(JavacResolution.java:332)
        at lombok.javac.handlers.HandleVal.visitLocal(HandleVal.java:99)
        at lombok.javac.JavacNode.traverse(JavacNode.java:92)
        at lombok.javac.JavacAST.traverseChildren(JavacAST.java:113)
        at lombok.javac.JavacNode.traverse(JavacNode.java:77)
        at lombok.javac.JavacAST.traverseChildren(JavacAST.java:113)
        at lombok.javac.JavacNode.traverse(JavacNode.java:67)
        at lombok.javac.JavacAST.traverseChildren(JavacAST.java:113)
        at lombok.javac.JavacNode.traverse(JavacNode.java:98)
        at lombok.javac.JavacAST.traverseChildren(JavacAST.java:113)
        at lombok.javac.JavacNode.traverse(JavacNode.java:72)
        at lombok.javac.JavacAST.traverseChildren(JavacAST.java:113)
        at lombok.javac.JavacNode.traverse(JavacNode.java:67)
        at lombok.javac.JavacAST.traverseChildren(JavacAST.java:113)
        at lombok.javac.JavacNode.traverse(JavacNode.java:62)
        at lombok.javac.JavacAST.traverse(JavacAST.java:109)
        at lombok.javac.HandlerLibrary.callASTVisitors(HandlerLibrary.java:259)
        at lombok.javac.JavacTransformer.transform(JavacTransformer.java:71)
        at lombok.javac.apt.Processor.process(Processor.java:256)
        at lombok.core.AnnotationProcessor$JavacDescriptor.process(AnnotationProcessor.java:117)
        at lombok.core.AnnotationProcessor.process(AnnotationProcessor.java:169)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:793)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:722)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1700(JavacProcessingEnvironment.java:97)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1029)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1163)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1108)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
        at com.sun.tools.javac.main.Main.compile(Main.java:439)
        at com.sun.tools.javac.main.Main.compile(Main.java:353)
        at com.sun.tools.javac.main.Main.compile(Main.java:342)
        at com.sun.tools.javac.main.Main.compile(Main.java:333)
        at com.sun.tools.javac.Main.compile(Main.java:76)
        at com.sun.tools.javac.Main.main(Main.java:61)
error: Lombok visitor handler class lombok.javac.handlers.HandleVal failed: 
java.lang.NullPointerException
1 error

Original issue reported on code.google.com by francesc...@gmail.com on 10 Jul 2013 at 2:15

Attachments:

GoogleCodeExporter commented 9 years ago
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-1ubuntu1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Original comment by francesc...@gmail.com on 10 Jul 2013 at 2:16

GoogleCodeExporter commented 9 years ago
Reproduced in lombok 0.12.0 and javac 1.7.0_17

Original comment by r.spilker on 22 Jul 2013 at 7:40

GoogleCodeExporter commented 9 years ago
Isn't this the same as issue 361?

Original comment by askon...@gmail.com on 7 Oct 2013 at 6:12

GoogleCodeExporter commented 9 years ago
Yes, so it seems.
Thanks

Original comment by francesc...@gmail.com on 8 Oct 2013 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by askon...@gmail.com on 8 Oct 2013 at 10:01