Skip to content

java.lang.NullPointerException: Cannot invoke "com.sun.source.util.TreePath.getParentPath()" because "path" is null #3807

@martinmeeser

Description

@martinmeeser

Apache NetBeans version

Apache NetBeans 13

What happened

This shows up as exception in the notifications panel.

"""
java.lang.NullPointerException: Cannot invoke "com.sun.source.util.TreePath.getParentPath()" because "path" is null
at org.netbeans.modules.java.hints.jdk.ConvertToARM.findEnclosingTryPath(ConvertToARM.java:793)
at org.netbeans.modules.java.hints.jdk.ConvertToARM.findEnclosingARMPath(ConvertToARM.java:786)
at org.netbeans.modules.java.hints.jdk.ConvertToARM.insideARM(ConvertToARM.java:816)
at org.netbeans.modules.java.hints.jdk.ConvertToARM.hint1Impl(ConvertToARM.java:224)
at org.netbeans.modules.java.hints.jdk.ConvertToARM.hint11(ConvertToARM.java:194)
at jdk.internal.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[catch] at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:315)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:794)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.doComputeHints(HintsInvoker.java:562)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:282)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:227)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:192)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:165)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:127)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:113)
at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:63)
at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

"""

How to reproduce

not clear to me what exact step is causing it

Did this work correctly in an earlier version?

No

Operating System

Ubuntu Budgie 21.10

JDK

openjdk-17.0.1

Apache NetBeans packaging

Apache NetBeans Snap Package

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

Metadata

Metadata

Assignees

Labels

hintskind:bugBug report or fixneeds:triageRequires attention from one of the committerspending-responseAwaiting further information to be supplied

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions