Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when @NonNull is used in abstract method #594

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

NullPointerException when @NonNull is used in abstract method #594

lombokissues opened this issue Jul 14, 2015 · 5 comments
Assignees

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 559)

@lombokissues
Copy link
Author

👤 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
Copy link
Author

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

Confirmed; fixed in revision 72b55dc

Please wait for a new release :)

@lombokissues lombokissues added the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues
Copy link
Author

👤 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 Without further feedback this bug cannot be processed. If no feedback is provided, we close these. and removed accepted The issue/enhancement is valid, sensible, and explained in sufficient detail labels Jul 14, 2015
@lombokissues
Copy link
Author

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

@lombokissues lombokissues removed the parked Without further feedback this bug cannot be processed. If no feedback is provided, we close these. label Jul 14, 2015
@lombokissues
Copy link
Author

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants