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

Build failed with NPE #32

Closed
rbtr opened this issue Aug 2, 2015 · 4 comments
Closed

Build failed with NPE #32

rbtr opened this issue Aug 2, 2015 · 4 comments
Assignees
Labels

Comments

@rbtr
Copy link

rbtr commented Aug 2, 2015

I'm getting a build failure with this library. Relevant section of stacktrace:

Caused by: java.lang.NullPointerException
at me.denley.preferencebinder.internal.BindingCallCodeAnalyzer.visitMethod(BindingCallCodeAnalyzer.java:31)
at me.denley.preferencebinder.internal.BindingCallCodeAnalyzer.visitMethod(BindingCallCodeAnalyzer.java:13)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:800)
at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:68)
at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:81)
at com.sun.source.util.TreeScanner.scan(TreeScanner.java:91)
at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:99)
at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:133)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:720)
at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:50)
at me.denley.preferencebinder.internal.PreferenceBinderProcessor.classMakesStatementCall(PreferenceBinderProcessor.java:334)
at me.denley.preferencebinder.internal.PreferenceBinderProcessor.checkForBindingCalls(PreferenceBinderProcessor.java:310)
at me.denley.preferencebinder.internal.PreferenceBinderProcessor.findAndParseAnnotations(PreferenceBinderProcessor.java:100)
at me.denley.preferencebinder.internal.PreferenceBinderProcessor.process(PreferenceBinderProcessor.java:76)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
... 66 more

@denley
Copy link
Owner

denley commented Aug 2, 2015

Thanks for posting the stack trace. I'm looking into it now.

Would you mind sharing the class you are using this library in? It will help me understand the cause.

@denley denley added the bug label Aug 2, 2015
@denley denley self-assigned this Aug 2, 2015
@denley
Copy link
Owner

denley commented Aug 2, 2015

Actually, I've managed to reproduce it. It happens when you use the library in an abstract class with an abstract method.

@denley denley closed this as completed in 1c9cb5b Aug 2, 2015
@denley
Copy link
Owner

denley commented Aug 2, 2015

I've just released version 3.0.1, which includes a fix for this issue.

Please reopen this issue if you find that it's still not fully fixed yet.

@rbtr
Copy link
Author

rbtr commented Aug 2, 2015

Confirming the issue is fixed, builds with no errors.
Thanks for the quick response and nice work!

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

No branches or pull requests

2 participants