mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8194937: Inconsistent behavior of --validate-modules when combined with -m and other options
Reviewed-by: mchung
This commit is contained in:
parent
a6ac56a69e
commit
91d9f3fbe0
8 changed files with 378 additions and 270 deletions
|
@ -441,14 +441,6 @@ JavaMain(void * _args)
|
|||
LEAVE();
|
||||
}
|
||||
|
||||
// validate modules on the module path, then exit
|
||||
if (validateModules) {
|
||||
jboolean okay = ValidateModules(env);
|
||||
CHECK_EXCEPTION_LEAVE(1);
|
||||
if (!okay) ret = 1;
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
if (printVersion || showVersion) {
|
||||
PrintJavaVersion(env, showVersion);
|
||||
CHECK_EXCEPTION_LEAVE(0);
|
||||
|
@ -457,6 +449,11 @@ JavaMain(void * _args)
|
|||
}
|
||||
}
|
||||
|
||||
// modules have been validated at startup so exit
|
||||
if (validateModules) {
|
||||
LEAVE();
|
||||
}
|
||||
|
||||
/* If the user specified neither a class name nor a JAR file */
|
||||
if (printXUsage || printUsage || what == 0 || mode == LM_UNKNOWN) {
|
||||
PrintUsage(env, printXUsage);
|
||||
|
@ -1955,20 +1952,6 @@ DescribeModule(JNIEnv *env, char *optString)
|
|||
(*env)->CallStaticVoidMethod(env, cls, describeModuleID, joptString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate modules
|
||||
*/
|
||||
static jboolean
|
||||
ValidateModules(JNIEnv *env)
|
||||
{
|
||||
jmethodID validateModulesID;
|
||||
jclass cls = GetLauncherHelperClass(env);
|
||||
NULL_CHECK_RETURN_VALUE(cls, JNI_FALSE);
|
||||
validateModulesID = (*env)->GetStaticMethodID(env, cls, "validateModules", "()Z");
|
||||
NULL_CHECK_RETURN_VALUE(cls, JNI_FALSE);
|
||||
return (*env)->CallStaticBooleanMethod(env, cls, validateModulesID);
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints default usage or the Xusage message, see sun.launcher.LauncherHelper.java
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue