NullPointerException when @NonNull is used in abstract method #594

Closed
lombokissues opened this Issue Jul 14, 2015 · 5 comments

Projects

None yet

2 participants

@lombokissues
Collaborator

Migrated from Google Code (issue 559)

@lombokissues
Collaborator

👤 panur.1234   🕗 Aug 15, 2013 at 08:09 UTC

What steps will reproduce the problem?

  1. Use @ NonNull in abstract method:

import lombok.NonNull;

public abstract class Example {
public abstract void get(@ NonNull String a);
}

  1. Compile using javac

What is the expected output? What do you see instead?

java.lang.NullPointerException
at lombok.javac.handlers.NonNullHandler.handle(NonNullHandler.java:91)
at lombok.javac.HandlerLibrary$AnnotationHandlerContainer.handle(HandlerLibrary.java:105)
at lombok.javac.HandlerLibrary.handleAnnotation(HandlerLibrary.java:243)
at lombok.javac.JavacTransformer$AnnotationVisitor.visitAnnotationOnMethodArgument(JavacTransformer.java:101)
at lombok.javac.JavacNode.traverse(JavacNode.java:115)
at lombok.javac.JavacAST.traverseChildren(JavacAST.java:116)
at lombok.javac.JavacNode.traverse(JavacNode.java:88)
at lombok.javac.JavacAST.traverseChildren(JavacAST.java:116)
at lombok.javac.JavacNode.traverse(JavacNode.java:77)
at lombok.javac.JavacAST.traverseChildren(JavacAST.java:116)
at lombok.javac.JavacNode.traverse(JavacNode.java:67)
at lombok.javac.JavacAST.traverseChildren(JavacAST.java:116)
at lombok.javac.JavacNode.traverse(JavacNode.java:62)
at lombok.javac.JavacAST.traverse(JavacAST.java:112)
at lombok.javac.JavacTransformer.transform(JavacTransformer.java:70)
at lombok.javac.apt.Processor.process(Processor.java:252)
at lombok.core.AnnotationProcessor$JavacDescriptor.process(AnnotationProcessor.java:117)
at lombok.core.AnnotationProcessor.process(AnnotationProcessor.java:167)
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 annotation handler class lombok.javac.handlers.NonNullHandler failed on Example.java: java.lang.NullPointerException
1 error

What version of the product are you using? On what operating system?

Lombok version 0.12.0 and javac version 1.7.0_25.

Please provide any additional information below.

Lombok version 0.11.8 works OK.

@lombokissues
Collaborator

👤 askoning   🕗 Sep 20, 2013 at 15:19 UTC

Confirmed; fixed in revision 72b55dc

Please wait for a new release :)

@lombokissues
Collaborator

👤 r.spilker   🕗 Jan 23, 2014 at 22:20 UTC

Is this fixed? If there's no response soon it will be closed.

@lombokissues lombokissues added parked and removed accepted labels Jul 14, 2015
@lombokissues
Collaborator

👤 r.spilker   🕗 Feb 28, 2014 at 01:00 UTC

@lombokissues lombokissues removed the parked label Jul 14, 2015
@lombokissues
Collaborator

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment