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
Sep. 17, 2024 2:29:08 P.M. org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.ASTNode.getParent()" because "declaration" is null
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.ASTNode.getParent()" because "declaration" is null
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknow
n Source)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.ASTNode.getParent()" because "declaration" is null
at org.eclipse.jdt.internal.corext.fix.UnusedCodeFixCore$RemoveUnusedMemberOperation.removeUnusedName(UnusedCodeFixCore.java:287)
at org.eclipse.jdt.internal.corext.fix.UnusedCodeFixCore$RemoveUnusedMemberOperation.rewriteAST(UnusedCodeFixCore.java:268)
at org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore.createChange(CompilationUnitRewriteOperationsFixCore.java:123)
at org.eclipse.jdt.ls.core.internal.corrections.proposals.LocalCorrectionsSubProcessor.addUnusedMemberProposal(LocalCorrectionsSubProcessor.java:440)
at org.eclipse.jdt.ls.core.internal.corrections.QuickFixProcessor.process(QuickFixProcessor.java:346)
at org.eclipse.jdt.ls.core.internal.corrections.QuickFixProcessor.getCorrections(QuickFixProcessor.java:92)
at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:189)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$14(JDTLanguageServer.java:755)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
... 7 more
It's probably easy to fix upstream, but it's an odd way to fail.
The text was updated successfully, but these errors were encountered:
Test.java
Select
Add final modifier for 'val'
when activating code actions onval
. The code action request / subsequent resolve aren't what trigger the error. It's the automatic code action that gets triggered after thefinal
is inserted. That request, ends up at https://github.com/eclipse-jdt/eclipse.jdt.ui/blob/64ae4a641278cc444769d1fe0b04b89d9ba8c297/org.eclipse.jdt.core.manipulation/core%20extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFixCore.java#L287 as if the binding forval
were a type binding, instead of a local variable binding. If code action is re-triggered, it gets recognized correctly as a variable binding. Almost seems like the bindings are not entirely correct immediately after an edit takes place.It's probably easy to fix upstream, but it's an odd way to fail.
The text was updated successfully, but these errors were encountered: