8210275: Source Launcher should fail if --source is used without a source file

Reviewed-by: mchung, alanb, mcimadamore
This commit is contained in:
Jonathan Gibbons 2018-09-21 15:38:43 -07:00
parent 82ed2a5fc0
commit 8edf8e2b03
4 changed files with 35 additions and 8 deletions

View file

@ -1326,7 +1326,9 @@ ParseArguments(int *pargc, char ***pargv,
JLI_StrCmp(arg, "-cp") == 0) {
REPORT_ERROR (has_arg_any_len, ARG_ERROR1, arg);
SetClassPath(value);
mode = LM_CLASS;
if (mode != LM_SOURCE) {
mode = LM_CLASS;
}
} else if (JLI_StrCmp(arg, "--list-modules") == 0) {
listModules = JNI_TRUE;
} else if (JLI_StrCmp(arg, "--show-resolved-modules") == 0) {