< prev index next >

src/java.base/share/native/libjli/java.c

Print this page
rev 50671 : [mq]: validate-modules

@@ -439,26 +439,23 @@
         DescribeModule(env, describeModule);
         CHECK_EXCEPTION_LEAVE(1);
         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);
         if (printVersion) {
             LEAVE();
         }
     }
 
+    // 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);
         CHECK_EXCEPTION_LEAVE(1);
         LEAVE();

@@ -1953,24 +1950,10 @@
             "describeModule", "(Ljava/lang/String;)V"));
     NULL_CHECK(joptString = (*env)->NewStringUTF(env, 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
  */
 static void
 PrintUsage(JNIEnv* env, jboolean doXUsage)
< prev index next >