8129601: [launcher] test VersionCheck.java fails with new version string
authorksrini
Fri, 26 Jun 2015 15:15:41 -0700
changeset 33987 24ecd3c83f33
parent 33986 5cbe9cd17789
child 33988 2da806876c60
8129601: [launcher] test VersionCheck.java fails with new version string Reviewed-by: alanb
jdk/src/java.base/share/native/launcher/defines.h
jdk/src/java.base/share/native/libjli/java.c
jdk/src/java.base/share/native/libjli/java.h
jdk/test/tools/launcher/VersionCheck.java
--- a/jdk/src/java.base/share/native/launcher/defines.h	Fri Jun 19 10:58:00 2015 -0700
+++ b/jdk/src/java.base/share/native/launcher/defines.h	Fri Jun 26 15:15:41 2015 -0700
@@ -40,13 +40,8 @@
 #error "VERSION_STRING must be defined"
 #endif
 
-#if defined(VERSION_MAJOR) && defined(VERSION_MINOR)
-#define DOT_VERSION STR(VERSION_MAJOR) "." STR(VERSION_MINOR)
-#else
-/* make sure the compilation fails */
-#error "JDK_MAJOR_VERSION and JDK_MINOR_VERSION must be defined"
-#endif
-
+/* Unused, but retained for JLI_Launch compatibility*/
+#define DOT_VERSION "0.0"
 
 #ifdef JAVA_ARGS
 #define HAS_JAVA_ARGS JNI_TRUE
--- a/jdk/src/java.base/share/native/libjli/java.c	Fri Jun 19 10:58:00 2015 -0700
+++ b/jdk/src/java.base/share/native/libjli/java.c	Fri Jun 26 15:15:41 2015 -0700
@@ -74,7 +74,6 @@
 static const char *_launcher_name;
 static jboolean _is_java_args = JNI_FALSE;
 static const char *_fVersion;
-static const char *_dVersion;
 static jboolean _wc_enabled = JNI_FALSE;
 static jint _ergo_policy = DEFAULT_POLICY;
 
@@ -183,7 +182,7 @@
         int jargc, const char** jargv,          /* java args */
         int appclassc, const char** appclassv,  /* app classpath */
         const char* fullversion,                /* full version defined */
-        const char* dotversion,                 /* dot version defined */
+        const char* dotversion,                 /* UNUSED dot version defined */
         const char* pname,                      /* program name */
         const char* lname,                      /* launcher name */
         jboolean javaargs,                      /* JAVA_ARGS */
@@ -204,7 +203,6 @@
     char jvmcfg[MAXPATHLEN];
 
     _fVersion = fullversion;
-    _dVersion = dotversion;
     _launcher_name = lname;
     _program_name = pname;
     _is_java_args = javaargs;
@@ -1886,12 +1884,6 @@
 }
 
 const char*
-GetDotVersion()
-{
-    return _dVersion;
-}
-
-const char*
 GetFullVersion()
 {
     return _fVersion;
@@ -1978,7 +1970,6 @@
     printf("\tlauncher name:%s\n", GetLauncherName());
     printf("\tjavaw:%s\n", (IsJavaw() == JNI_TRUE) ? "on" : "off");
     printf("\tfullversion:%s\n", GetFullVersion());
-    printf("\tdotversion:%s\n", GetDotVersion());
     printf("\tergo_policy:");
     switch(GetErgoPolicy()) {
         case NEVER_SERVER_CLASS:
--- a/jdk/src/java.base/share/native/libjli/java.h	Fri Jun 19 10:58:00 2015 -0700
+++ b/jdk/src/java.base/share/native/libjli/java.h	Fri Jun 26 15:15:41 2015 -0700
@@ -169,7 +169,6 @@
 };
 
 const char* GetProgramName();
-const char* GetDotVersion();
 const char* GetFullVersion();
 jboolean IsJavaArgs();
 jboolean IsJavaw();
--- a/jdk/test/tools/launcher/VersionCheck.java	Fri Jun 19 10:58:00 2015 -0700
+++ b/jdk/test/tools/launcher/VersionCheck.java	Fri Jun 26 15:15:41 2015 -0700
@@ -183,13 +183,6 @@
                                            "build".length() + 1,
                                            refVersion.lastIndexOf(")"));
 
-        String[] vStr = bStr.split("\\.|-|_");
-        String jdkMajor = vStr[0];
-        String jdkMinor = vStr[1];
-        String jdkMicro = vStr[2];
-        String jdkBuild = vStr[vStr.length - 1];
-
-        String expectedDotVersion = "dotversion:" + jdkMajor + "." + jdkMinor;
         String expectedFullVersion = "fullversion:" + bStr;
 
         Map<String, String> envMap = new HashMap<>();
@@ -200,10 +193,6 @@
         for (String x : tr.testOutput) {
             alist.add(x.trim());
         }
-        if (!alist.contains(expectedDotVersion)) {
-            System.out.println("Error: could not find " + expectedDotVersion);
-            failcount++;
-        }
 
         if (!alist.contains(expectedFullVersion)) {
             System.out.println("Error: could not find " + expectedFullVersion);