Skip to content

Commit

Permalink
address linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed May 7, 2019
1 parent ae99ec4 commit aee910e
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions x-pack/plugins/code/server/lsp/java_launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class JavaLauncher implements ILanguageServerLauncher {
process.platform === 'win32' ? 'java.exe' : 'java'
);

let params: string[] = [
const params: string[] = [
'-Declipse.application=org.elastic.jdt.ls.core.id1',
'-Dosgi.bundles.defaultStartLevel=4',
'-Declipse.product=org.elastic.jdt.ls.core.product',
Expand All @@ -167,27 +167,25 @@ export class JavaLauncher implements ILanguageServerLauncher {
];

if (this.needModuleArguments) {
params.push('--add-modules=ALL-SYSTEM',
'--add-opens',
'java.base/java.util=ALL-UNNAMED',
'--add-opens',
'java.base/java.lang=ALL-UNNAMED');
params.push(
'--add-modules=ALL-SYSTEM',
'--add-opens',
'java.base/java.util=ALL-UNNAMED',
'--add-opens',
'java.base/java.lang=ALL-UNNAMED'
);
}

const p = spawn(
javaPath,
params,
{
detached: false,
stdio: 'pipe',
env: {
...process.env,
CLIENT_HOST: '127.0.0.1',
CLIENT_PORT: port.toString(),
JAVA_HOME: javaHomePath,
},
}
);
const p = spawn(javaPath, params, {
detached: false,
stdio: 'pipe',
env: {
...process.env,
CLIENT_HOST: '127.0.0.1',
CLIENT_PORT: port.toString(),
JAVA_HOME: javaHomePath,
},
});
p.stdout.on('data', data => {
log.stdout(data.toString());
});
Expand Down

0 comments on commit aee910e

Please sign in to comment.