Skip to content

Commit 7e523ba

Browse files
committed
Simplify some parameters which are always the same
1 parent d440623 commit 7e523ba

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

sdk/src/org.graalvm.launcher/src/org/graalvm/launcher/AbstractLanguageLauncher.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private static Constructor<AbstractLanguageLauncher> getLauncherCtor() {
122122
protected final void launch(String[] args) {
123123
try {
124124
try {
125-
launch(new ArrayList<>(Arrays.asList(args)), null, true);
125+
launch(new ArrayList<>(Arrays.asList(args)));
126126
} catch (AbortException e) {
127127
throw e;
128128
} catch (PolyglotException e) {
@@ -260,15 +260,12 @@ protected long getNativeArgv() {
260260

261261
protected static final boolean IS_LIBPOLYGLOT = Boolean.getBoolean("graalvm.libpolyglot");
262262

263-
final void launch(List<String> args, Map<String, String> defaultOptions, boolean doNativeSetup) {
263+
final void launch(List<String> args) {
264264
List<String> originalArgs = Collections.unmodifiableList(new ArrayList<>(args));
265265

266-
Map<String, String> polyglotOptions = defaultOptions;
267-
if (polyglotOptions == null) {
268-
polyglotOptions = new HashMap<>();
269-
}
266+
Map<String, String> polyglotOptions = new HashMap<>();
270267

271-
if (isAOT() && doNativeSetup) {
268+
if (isAOT()) {
272269
System.setProperty("org.graalvm.launcher.languageId", getLanguageId());
273270
}
274271

@@ -278,7 +275,7 @@ final void launch(List<String> args, Map<String, String> defaultOptions, boolean
278275
validateVmArguments(originalArgs, unrecognizedArgs);
279276
}
280277

281-
if (isAOT() && doNativeSetup && !IS_LIBPOLYGLOT) {
278+
if (isAOT() && !IS_LIBPOLYGLOT) {
282279
assert nativeAccess != null;
283280
maybeExec(originalArgs, unrecognizedArgs, getDefaultVMType(), jniLaunch);
284281
}

0 commit comments

Comments
 (0)