Fix bug causing NPE in launch-util

This commit is contained in:
Kris De Volder
2018-04-02 17:28:21 -07:00
parent b78efcde18
commit b684bf0d20
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@pivotal-tools/commons-vscode",
"version": "0.2.0",
"version": "0.2.1",
"description": "commons-vscode",
"license": "MIT",
"repository": "",

View File

@@ -45,7 +45,7 @@ function getUserDefinedJvmHeap(wsOpts : VSCode.WorkspaceConfiguration, dflt : s
return dflt;
}
let javaOptions : JavaOptions = wsOpts.get("java");
return javaOptions.heap || dflt;
return (javaOptions && javaOptions.heap) || dflt;
}
export function activate(options: ActivatorOptions, context: VSCode.ExtensionContext): Thenable<LanguageClient> {
@@ -112,6 +112,7 @@ export function activate(options: ActivatorOptions, context: VSCode.ExtensionCon
let logfile = Path.join(tmpdir(), options.extensionId + '-' + Date.now()+'.log');
log('Redirecting server logs to ' + logfile);
const args = [
'-Dspring.lsp.client-port='+port,
'-Dserver.port=' + port,
'-Dsts.lsp.client=vscode',
'-Dsts.log.file=' + logfile