JDK 9 RFR of 8050051: Remove unneeded/obsolete -source/-target options in shell tests

Joe Darcy joe.darcy at oracle.com
Fri Jul 11 20:01:09 UTC 2014


Hello,

The purge of old -source and -target values in the JDK regression tests 
missed a few items. Please review the patch below which fixes two of them.

Thanks,

-Joe

diff -r d5404a4e4fac test/java/lang/Class/forName/NonJavaNames.sh
--- a/test/java/lang/Class/forName/NonJavaNames.sh    Fri Jul 11 
14:53:55 2014 +0100
+++ b/test/java/lang/Class/forName/NonJavaNames.sh    Fri Jul 11 
12:58:18 2014 -0700
@@ -25,19 +25,17 @@
  # @bug 4952558
  # @summary Verify names that aren't legal Java names are accepted by 
forName.
  # @author Joseph D. Darcy
-# @compile -source 1.5 -target 1.5 NonJavaNames.java
+# @compile NonJavaNames.java
  # @run shell NonJavaNames.sh

  # This test uses hand-generated class files stored in the ./classes
  # directory.  After the renaming done below, those class files have
-# single character names that are legal class names under class file
-# version 49 but *not* legal Java language identifiers; e.g. "3" and
-# "+".  First, Z.java is compiled to Z.class using "-target 1.5."
-# Next, to create a test class file, the appropriate name structures
-# within the class files are updated, as is the "Hello world" string
-# the class's main method prints out.  If the definition of the
-# semantics of "-target 1.5" changes, the test class files should be
-# regenerated.
+# single character names that are legal class names under in the class
+# file but *not* legal Java language identifiers; e.g. "3" and "+".
+# First, Z.java is compiled to Z.class.  Next, to create a test class
+# file, the appropriate name structures within the class files are
+# updated, as is the "Hello world" string the class's main method
+# prints out.

  # Verify directory context variables are set
  if [ "${TESTJAVA}" = "" ]
diff -r d5404a4e4fac test/tools/pack200/PackageVersionTest.java
--- a/test/tools/pack200/PackageVersionTest.java    Fri Jul 11 14:53:55 
2014 +0100
+++ b/test/tools/pack200/PackageVersionTest.java    Fri Jul 11 12:58:18 
2014 -0700
@@ -59,13 +59,10 @@
          }

          File out = new File("test.pack");
-        createClassFile("Test5");
          createClassFile("Test6");
          createClassFile("Test7");

          verify6991164();
-        verifyPack("Test5.class", JAVA5_PACKAGE_MAJOR_VERSION,
-                JAVA5_PACKAGE_MINOR_VERSION);

          verifyPack("Test6.class", JAVA6_PACKAGE_MAJOR_VERSION,
                  JAVA6_PACKAGE_MINOR_VERSION);
@@ -98,7 +95,7 @@
          String target = name.substring(name.length() - 1);
          String javacCmds[] = {
              "-source",
-            "5",
+            "6",
              "-target",
              name.substring(name.length() - 1),
              name + ".java"




More information about the core-libs-dev mailing list