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
java.lang.NullPointerException: Cannot invoke "org.netbeans.spi.java.hints.HintContext.getInfo()" because "this.ctx" is null
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitPrimitiveWrapperMethods(NPECheck.java:1076)
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethodInvocation(NPECheck.java:1042)
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitMethodInvocation(NPECheck.java:575)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1877)
at com.sun.source.util.TreeScanner.scan(TreeScanner.java:91)
at org.netbeans.api.java.source.support.CancellableTreeScanner.scan(CancellableTreeScanner.java:69)
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:677)
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitBinary(NPECheck.java:898)
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitBinary(NPECheck.java:575)
at com.sun.tools.javac.tree.JCTree$JCBinary.accept(JCTree.java:2231)
at com.sun.source.util.TreeScanner.scan(TreeScanner.java:91)
at org.netbeans.api.java.source.support.CancellableTreeScanner.scan(CancellableTreeScanner.java:69)
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.scan(NPECheck.java:677)
at org.netbeans.modules.java.hints.bugs.NPECheck$VisitorImpl.visitNewClass(NPECheck.java:1008)
null seems to be a legal value for ctx - judging from the null checks in other places of the class.
Language / Project Type / NetBeans Component
No response
How to reproduce
see above
Did this work correctly in an earlier version?
No / Don't know
Operating System
linux
JDK
23
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No - not right now
The text was updated successfully, but these errors were encountered:
mbien
added
hints
Java
[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)
kind:bug
Bug report or fix
labels
Feb 21, 2025
Apache NetBeans version
Apache NetBeans 24
What happened
simplified snippet taken from NB repo:
run hint -> convert to switch statement
results:
null seems to be a legal value for
ctx
- judging from the null checks in other places of the class.Language / Project Type / NetBeans Component
No response
How to reproduce
see above
Did this work correctly in an earlier version?
No / Don't know
Operating System
linux
JDK
23
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No - not right now
The text was updated successfully, but these errors were encountered: