You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/02/01 10:09:53 UTC

[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2718: Fixing failing build.

JaroslavTulach commented on a change in pull request #2718:
URL: https://github.com/apache/netbeans/pull/2718#discussion_r567702175



##########
File path: java/java.lsp.server/vscode/src/extension.ts
##########
@@ -41,7 +41,7 @@ import * as launcher from './nbcode';
 import { StatusMessageRequest, ShowStatusMessageParams, QuickPickRequest, InputBoxRequest } from './protocol';
 
 const API_VERSION : string = "1.0";
-let client: Promise<LanguageClient>;
+let client: Promise<LanguageClient> | null = null;

Review comment:
       Ideally this `client` promise could be set soon to be defined (not `undefined`) and resolved later. That would mean to make sure the `client` promise is set sooner then `registerCommand` is registered. E.g. 
   ```
   let c : LanguageClient = await client
   ```
   can only be called when the `client` is defined.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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