8293041: --disable-@files option doesn't work and cause an error

Reviewed-by: alanb
This commit is contained in:
Adam Sotona 2022-11-18 14:55:30 +00:00
parent 761a4f4852
commit 13158cb52d
2 changed files with 7 additions and 1 deletions

View file

@ -1374,6 +1374,8 @@ ParseArguments(int *pargc, char ***pargv,
JLI_ReportErrorMessage(ARG_WARN, arg);
} else if (JLI_StrCCmp(arg, "-splash:") == 0) {
; /* Ignore machine independent options already handled */
} else if (JLI_StrCmp(arg, "--disable-@files") == 0) {
; /* Ignore --disable-@files option already handled */
} else if (ProcessPlatformOption(arg)) {
; /* Processing of platform dependent options */
} else {

View file

@ -23,7 +23,7 @@
/**
* @test
* @bug 8027634 8231863
* @bug 8027634 8231863 8293041
* @summary Argument parsing from file
* @modules jdk.compiler
* jdk.zipfs
@ -222,6 +222,10 @@ public class ArgsFileTest extends TestHelper {
verifyUserArgs(Arrays.asList("uarg1", "@uarg2", "@@uarg3",
"-uarg4", "uarg5", "@argKill"), tr, 3);
// --disable-@files should never pass to VM
tr = doExec(env, javaCmd, "@argKill", "--disable-@files", "--version");
tr.checkPositive();
argFile1.delete();
argFile2.delete();
argKill.delete();