sdedic commented on a change in pull request #2493:
URL: https://github.com/apache/netbeans/pull/2493#discussion_r512026565



##########
File path: 
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
##########
@@ -216,7 +242,42 @@ Lookup getSessionLookup() {
             capabilities.setDocumentHighlightProvider(true);
             capabilities.setReferencesProvider(true);
             capabilities.setExecuteCommandProvider(new 
ExecuteCommandOptions(Arrays.asList(JAVA_BUILD_WORKSPACE, 
GRAALVM_PAUSE_SCRIPT)));
-            return CompletableFuture.completedFuture(new 
InitializeResult(capabilities));
+            return new InitializeResult(capabilities);
+        }
+        
+        @Override
+        public CompletableFuture<InitializeResult> initialize(InitializeParams 
init) {

Review comment:
       Note this change: some events are fired synchronously from Open Project. 
If the code asks for something like DialogDisplayer.notify (which some code 
really does), the initialization request processing would block - and the 
notify() round-trip would be never completed, freezing LSP client-server 
communication completely.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to