-
Notifications
You must be signed in to change notification settings - Fork 883
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
Java code scanning while opening project throws NPE #8388
Comments
I tried to reproduce this with both the NB 25 release build and using We can still add the null check since it probably doesn't hurt. |
i checked the logs of my work IDE and did see the exception too:
might be a race condition during startup and likely depends on what file and/or project is selected during scan. |
Apache NetBeans version
Apache NetBeans latest daily build
What happened
While opening a NetBeans project (netbeans/java/refactoring.java) netbeans shows an error in in the bottom status line.
This happens only after a fresh netbeans installation is used on a first project scan.
The stacktrace shows
The resolution in this case is simple, check the
Element e
for nulity before dereferencing.The relevant code is:
The solution is simple modify first line to
which has no adverse effect on the logic.
Language / Project Type / NetBeans Component
java/ netbeans/ Java Profiler profiler(NetBeans Bindings)
How to reproduce
run
ant tryme
on a freshly built netbeans and open a netbeans module for instance java/refactoring.java.If you ran tryme before, remove ~/.netbeans
Did this work correctly in an earlier version?
No / Don't know
Operating System
Ubunutu 24.04
JDK
17
Apache NetBeans packaging
Own source build
Anything else
You may have to clean caches from an earlier run.
Are you willing to submit a pull request?
Yes
The text was updated successfully, but these errors were encountered: