Skip to content

Commit

Permalink
java.lang.NullPointerException: Cannot invoke
Browse files Browse the repository at this point in the history
"java.util.concurrent.CompletableFuture.thenRun(java.lang.Runnable)"
because "this.initializeFuture" is null

Fixes #748

Signed-off-by: azerr <[email protected]>
  • Loading branch information
angelozerr authored and adietish committed Mar 31, 2023
1 parent afa96c3 commit 02ba90c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ public synchronized void start() throws IOException {
initializeFuture = languageServer.initialize(initParams).thenAccept(res -> {
serverCapabilities = res.getCapabilities();
this.initiallySupportsWorkspaceFolders = supportsWorkspaceFolders(serverCapabilities);
}).thenRun(() -> {
});
initializeFuture.thenRun(() -> {
// Here we call languageServer.initialized which will send to this IJ LSP client several 'client/registerCapability'
// which will call the private method registerCapability(RegistrationParams params)
// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#client_registerCapability
this.languageServer.initialized(new InitializedParams());
});

Expand Down

0 comments on commit 02ba90c

Please sign in to comment.