Skip to content

Commit

Permalink
Removed -noverify flag using solution from vscode-java. Fixes redhat-…
Browse files Browse the repository at this point in the history
…developer#259

Signed-off-by: David Thompson <davthomp@redhat.com>
  • Loading branch information
datho7561 committed May 19, 2020
1 parent 35d4af9 commit ae4f44d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@
"string",
"null"
],
"default": "-noverify -Xmx64M -XX:+UseG1GC -XX:+UseStringDeduplication",
"description": "Specifies extra VM arguments used to launch the XML Language Server. Eg. use `-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector.",
"default": "-Xmx64M -XX:+UseG1GC -XX:+UseStringDeduplication",
"description": "Specifies extra VM arguments used to launch the XML Language Server. Eg. use `-Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector.",
"scope": "window"
},
"xml.server.workDir": {
Expand Down
6 changes: 6 additions & 0 deletions src/javaServerStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ function prepareParams(requirements: RequirementsData, xmlJavaExtensions: string
params.push(watchParentProcess + 'false');
}
}
// "OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify
// were deprecated in JDK 13 and will likely be removed in a future release."
// so only add -noverify for older versions
if (params.indexOf('-noverify') < 0 && params.indexOf('-Xverify:none') < 0 && requirements.java_version < 13) {
params.push('-noverify');
}
parseVMargs(params, vmargs);
let server_home: string = path.resolve(__dirname, '../server');
let launchersFound: Array<string> = glob.sync('**/org.eclipse.lemminx*-uber.jar', { cwd: server_home });
Expand Down

0 comments on commit ae4f44d

Please sign in to comment.