Skip to content

Commit b4c0d47

Browse files
committed
Do not exclude duplicate flags specified by java.jdt.ls.vmargs.
- Flags like --add-exports, which can be specified multiple times can break if excluded - Adjust testcase - Fix typo in README Signed-off-by: Roland Grunberg <[email protected]>
1 parent 34f54ac commit b4c0d47

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ For information on getting started, refer to the [CONTRIBUTING instructions](CON
269269
Continuous Integration builds can be installed from [http://download.jboss.org/jbosstools/jdt.ls/staging/](http://download.jboss.org/jbosstools/jdt.ls/staging/?C=M;O=D). Download the most recent `java-<version>.vsix` file and install it by following the instructions [here](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix).
270270
Stable releases are archived under http://download.jboss.org/jbosstools/static/jdt.ls/stable/.
271271

272-
Also, you can contribute your own VSCode extension to enhance the existing features by following the instructions [here](https://github.com/redhat-developer/vscode-java/wiki/Contribute-a-Java-Extension).
272+
Also, you can contribute your own VS Code extension to enhance the existing features by following the instructions [here](https://github.com/redhat-developer/vscode-java/wiki/Contribute-a-Java-Extension).
273273

274274
Feedback
275275
===============

src/javaServerStarter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,7 @@ export function parseVMargs(params: any[], vmargsLine: string) {
312312
arg = arg.replace(/(\\)?"/g, ($0, $1) => { return ($1 ? $0 : ''); });
313313
// unescape all escaped double quotes
314314
arg = arg.replace(/(\\)"/g, '"');
315-
if (params.indexOf(arg) < 0) {
316-
params.push(arg);
317-
}
315+
params.push(arg);
318316
});
319317
}
320318

test/standard-mode-suite/extension.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ suite('Java Language Extension - Standard', () => {
134134

135135
java.parseVMargs(vmArgs, userArgs);
136136

137-
assert.equal(4, vmArgs.length);
137+
assert.equal(5, vmArgs.length);
138138
assert.equal('-noverify', vmArgs[0]);
139139
assert.equal('foo', vmArgs[1]);
140140
assert.equal('-Xmx512m', vmArgs[2]);
141-
assert.equal('-Dfoo=something with blank', vmArgs[3]);
141+
assert.equal('-Dfoo=something with blank', vmArgs[4]);
142142
});
143143

144144
test('should parse VM arguments with spaces', () => {

0 commit comments

Comments
 (0)