< prev index next >
jdk/src/java.base/share/native/libjli/java.c
Print this page
*** 554,577 ****
return IsClassPathOption(name) ||
IsLauncherMainOption(name) ||
JLI_StrCmp(name, "--list-modules") == 0;
}
- #ifndef OLD_MODULE_OPTIONS
- /*
- * Old module options for transition
- */
- static jboolean
- IsOldModuleOption(const char* name) {
- return JLI_StrCmp(name, "-modulepath") == 0 ||
- JLI_StrCmp(name, "-mp") == 0 ||
- JLI_StrCmp(name, "-upgrademodulepath") == 0 ||
- JLI_StrCmp(name, "-addmods") == 0 ||
- JLI_StrCmp(name, "-limitmods") == 0;
- }
- #endif
-
/*
* Test if the given name is a module-system white-space option that
* will be passed to the VM with its corresponding long-form option
* name and "=" delimiter.
*/
--- 554,563 ----
*** 582,593 ****
JLI_StrCmp(name, "--upgrade-module-path") == 0 ||
JLI_StrCmp(name, "--add-modules") == 0 ||
JLI_StrCmp(name, "--limit-modules") == 0 ||
JLI_StrCmp(name, "--add-exports") == 0 ||
JLI_StrCmp(name, "--add-reads") == 0 ||
! JLI_StrCmp(name, "--patch-module") == 0 ||
! IsOldModuleOption(name);
}
/*
* Test if the given name has a white space option.
*/
--- 568,578 ----
JLI_StrCmp(name, "--upgrade-module-path") == 0 ||
JLI_StrCmp(name, "--add-modules") == 0 ||
JLI_StrCmp(name, "--limit-modules") == 0 ||
JLI_StrCmp(name, "--add-exports") == 0 ||
JLI_StrCmp(name, "--add-reads") == 0 ||
! JLI_StrCmp(name, "--patch-module") == 0;
}
/*
* Test if the given name has a white space option.
*/
*** 1222,1257 ****
} else {
kind = VM_LONG_OPTION;
}
}
- #ifndef OLD_MODULE_OPTIONS
- // for transition to support both old and new syntax
- if (JLI_StrCmp(arg, "-modulepath") == 0 ||
- JLI_StrCmp(arg, "-mp") == 0) {
- option = "--module-path";
- } else if (JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
- option = "--upgrade-module-path";
- } else if (JLI_StrCmp(arg, "-addmods") == 0) {
- option = "--add-modules";
- } else if (JLI_StrCmp(arg, "-limitmods") == 0) {
- option = "--limit-modules";
- } else if (JLI_StrCCmp(arg, "-XaddExports:") == 0) {
- option = "--add-exports";
- value = arg + 13;
- kind = VM_LONG_OPTION_WITH_ARGUMENT;
- } else if (JLI_StrCCmp(arg, "-XaddReads:") == 0) {
- option = "--add-reads";
- value = arg + 11;
- kind = VM_LONG_OPTION_WITH_ARGUMENT;
- } else if (JLI_StrCCmp(arg, "-Xpatch:") == 0) {
- option = "--patch-module";
- value = arg + 8;
- kind = VM_LONG_OPTION_WITH_ARGUMENT;
- }
- #endif
-
*pargc = argc;
*pargv = argv;
*poption = option;
*pvalue = value;
return kind;
--- 1207,1216 ----
*** 1338,1357 ****
JLI_StrCmp(arg, "--add-exports") == 0 ||
JLI_StrCmp(arg, "--add-reads") == 0 ||
JLI_StrCmp(arg, "--patch-module") == 0) {
REPORT_ERROR (has_arg, ARG_ERROR6, arg);
}
- #ifndef OLD_MODULE_OPTIONS
- else if (JLI_StrCmp(arg, "-modulepath") == 0 ||
- JLI_StrCmp(arg, "-mp") == 0 ||
- JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
- REPORT_ERROR (has_arg, ARG_ERROR4, arg);
- } else if (JLI_StrCmp(arg, "-addmods") == 0 ||
- JLI_StrCmp(arg, "-limitmods") == 0) {
- REPORT_ERROR (has_arg, ARG_ERROR6, arg);
- }
- #endif
/*
* The following cases will cause the argument parsing to stop
*/
} else if (JLI_StrCmp(arg, "--help") == 0 ||
JLI_StrCmp(arg, "-help") == 0 ||
--- 1297,1306 ----
< prev index next >