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
As far as I can tell the error only happens when using some snippets:
java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because the return value of "org.eclipse.jdt.ls.core.internal.handlers.CompletionResponse.getItems()" is null
at org.eclipse.jdt.ls.core.internal.handlers.CompletionHandler.onDidCompletionItemSelect(CompletionHandler.java:137)
at org.eclipse.jdt.ls.core.internal.JDTDelegateCommandHandler.executeCommand(JDTDelegateCommandHandler.java:152)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:561)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:79)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
I can produce this if I write sysout and then trigger completion. The response from the server is:
Using latest master of eclipse.jdt.ls (45f31c1)
As far as I can tell the error only happens when using some snippets:
I can produce this if I write
sysout
and then trigger completion. The response from the server is:If the client then triggers the
java.completion.onDidSelect
command the exception is raised in:https://github.com/eclipse/eclipse.jdt.ls/blob/45f31c1f1a940724491d32ced30480e80603d02b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CompletionHandler.java#L137
From what I can tell there are two different
CompletionResponse
instances in theCompletionResponses
cache.One is set here: https://github.com/eclipse/eclipse.jdt.ls/blob/45f31c1f1a940724491d32ced30480e80603d02b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/contentassist/SnippetCompletionProposal.java#L324-L325
This one has no items.
The other one here: https://github.com/eclipse/eclipse.jdt.ls/blob/45f31c1f1a940724491d32ced30480e80603d02b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/contentassist/CompletionProposalRequestor.java#L255
This one would have items, but is not retrieved in the
onDidSelect
The text was updated successfully, but these errors were encountered: