6843648: tools/javac/versions/check.sh is broken

Wed, 20 May 2009 19:10:06 -0700

author
jjg
date
Wed, 20 May 2009 19:10:06 -0700
changeset 287
44eaac2b4501
parent 286
79eb8795a1de
child 288
d402db1005ad

6843648: tools/javac/versions/check.sh is broken
Reviewed-by: darcy

test/tools/javac/6341866/Anno.java file | annotate | diff | comparison | revisions
test/tools/javac/6464451/BigFinally.java file | annotate | diff | comparison | revisions
test/tools/javac/6464451/DeepNestedFinally.java file | annotate | diff | comparison | revisions
test/tools/javac/6464451/ManyExitsInTry.java file | annotate | diff | comparison | revisions
test/tools/javac/ClassLit.java file | annotate | diff | comparison | revisions
test/tools/javac/T6557865.java file | annotate | diff | comparison | revisions
test/tools/javac/foreach/T6682380.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/6348499/A.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/6414633/A.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/6430209/b6341534.java file | annotate | diff | comparison | revisions
test/tools/javac/processing/T6439826.java file | annotate | diff | comparison | revisions
test/tools/javac/stackmap/T4955930.sh file | annotate | diff | comparison | revisions
test/tools/javac/versions/check.sh file | annotate | diff | comparison | revisions
     1.1 --- a/test/tools/javac/6341866/Anno.java	Wed May 20 13:36:23 2009 -0700
     1.2 +++ b/test/tools/javac/6341866/Anno.java	Wed May 20 19:10:06 2009 -0700
     1.3 @@ -27,7 +27,7 @@
     1.4  import javax.lang.model.element.*;
     1.5  
     1.6  @SupportedAnnotationTypes("*")
     1.7 -    @SupportedSourceVersion(SourceVersion.RELEASE_6)
     1.8 +    @SupportedSourceVersion(SourceVersion.RELEASE_7)
     1.9  public class Anno extends AbstractProcessor {
    1.10      public boolean process(Set<? extends TypeElement> annotations,
    1.11                                      RoundEnvironment roundEnv) {
     2.1 --- a/test/tools/javac/6464451/BigFinally.java	Wed May 20 13:36:23 2009 -0700
     2.2 +++ b/test/tools/javac/6464451/BigFinally.java	Wed May 20 19:10:06 2009 -0700
     2.3 @@ -26,7 +26,7 @@
     2.4   * @bug     6464451
     2.5   * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
     2.6   * @author  Wei Tao
     2.7 - * @compile -target 5 BigFinally.java
     2.8 + * @compile -source 5 -target 5 BigFinally.java
     2.9   * @clean BigFinally
    2.10   * @compile/fail BigFinally.java
    2.11   */
     3.1 --- a/test/tools/javac/6464451/DeepNestedFinally.java	Wed May 20 13:36:23 2009 -0700
     3.2 +++ b/test/tools/javac/6464451/DeepNestedFinally.java	Wed May 20 19:10:06 2009 -0700
     3.3 @@ -26,7 +26,7 @@
     3.4   * @bug     6464451
     3.5   * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
     3.6   * @author  Wei Tao
     3.7 - * @compile -target 5 DeepNestedFinally.java
     3.8 + * @compile -source 5 -target 5 DeepNestedFinally.java
     3.9   * @clean DeepNestedFinally
    3.10   * @compile/fail DeepNestedFinally.java
    3.11   */
     4.1 --- a/test/tools/javac/6464451/ManyExitsInTry.java	Wed May 20 13:36:23 2009 -0700
     4.2 +++ b/test/tools/javac/6464451/ManyExitsInTry.java	Wed May 20 19:10:06 2009 -0700
     4.3 @@ -26,7 +26,7 @@
     4.4   * @bug     6464451
     4.5   * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
     4.6   * @author  Wei Tao
     4.7 - * @compile -target 5 ManyExitsInTry.java
     4.8 + * @compile -source 5 -target 5 ManyExitsInTry.java
     4.9   * @clean ManyExitsInTry
    4.10   * @compile/fail ManyExitsInTry.java
    4.11   */
     5.1 --- a/test/tools/javac/ClassLit.java	Wed May 20 13:36:23 2009 -0700
     5.2 +++ b/test/tools/javac/ClassLit.java	Wed May 20 19:10:06 2009 -0700
     5.3 @@ -27,7 +27,7 @@
     5.4   * @summary Use ldc instruction for class literals
     5.5   * @author gafter
     5.6   *
     5.7 - * @compile -target 1.5 ClassLit.java
     5.8 + * @compile -source 1.5 -target 1.5 ClassLit.java
     5.9   * @run main ClassLit
    5.10   */
    5.11  
     6.1 --- a/test/tools/javac/T6557865.java	Wed May 20 13:36:23 2009 -0700
     6.2 +++ b/test/tools/javac/T6557865.java	Wed May 20 19:10:06 2009 -0700
     6.3 @@ -24,10 +24,10 @@
     6.4  /*
     6.5   * @test
     6.6   * @bug 6557865
     6.7 - * @summary -target 5 should not put ACC_SYNTHETIC on package-info
     6.8 + * @summary -source 5 -target 5 should not put ACC_SYNTHETIC on package-info
     6.9   * @author Wei Tao
    6.10   * @compile T6557865.java
    6.11 - * @compile -target 5 T6232928/package-info.java
    6.12 + * @compile -source 5 -target 5 T6232928/package-info.java
    6.13   * @run main T6557865
    6.14   */
    6.15  
     7.1 --- a/test/tools/javac/foreach/T6682380.java	Wed May 20 13:36:23 2009 -0700
     7.2 +++ b/test/tools/javac/foreach/T6682380.java	Wed May 20 19:10:06 2009 -0700
     7.3 @@ -26,7 +26,7 @@
     7.4   * @bug 6682380 6679509
     7.5   * @summary Foreach loop with generics inside finally block crashes javac with -target 1.5
     7.6   * @author Jan Lahoda, Maurizio Cimadamore
     7.7 - * @compile -target 1.5 T6682380.java
     7.8 + * @compile -source 1.5 -target 1.5 T6682380.java
     7.9   */
    7.10  
    7.11  import java.util.List;
     8.1 --- a/test/tools/javac/processing/6348499/A.java	Wed May 20 13:36:23 2009 -0700
     8.2 +++ b/test/tools/javac/processing/6348499/A.java	Wed May 20 19:10:06 2009 -0700
     8.3 @@ -28,7 +28,7 @@
     8.4  import javax.lang.model.element.*;
     8.5  
     8.6  @SupportedAnnotationTypes("*")
     8.7 -@SupportedSourceVersion(SourceVersion.RELEASE_6)
     8.8 +@SupportedSourceVersion(SourceVersion.RELEASE_7)
     8.9  public class A extends AbstractProcessor {
    8.10      public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
    8.11          Filer filer = processingEnv.getFiler();
     9.1 --- a/test/tools/javac/processing/6414633/A.java	Wed May 20 13:36:23 2009 -0700
     9.2 +++ b/test/tools/javac/processing/6414633/A.java	Wed May 20 19:10:06 2009 -0700
     9.3 @@ -30,7 +30,7 @@
     9.4  import javax.tools.*;
     9.5  
     9.6  @SupportedAnnotationTypes("*")
     9.7 -@SupportedSourceVersion(SourceVersion.RELEASE_6)
     9.8 +@SupportedSourceVersion(SourceVersion.RELEASE_7)
     9.9  public class A extends AbstractProcessor {
    9.10  
    9.11      public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
    10.1 --- a/test/tools/javac/processing/6430209/b6341534.java	Wed May 20 13:36:23 2009 -0700
    10.2 +++ b/test/tools/javac/processing/6430209/b6341534.java	Wed May 20 19:10:06 2009 -0700
    10.3 @@ -30,7 +30,7 @@
    10.4  import java.util.Set;
    10.5  
    10.6  @SupportedAnnotationTypes({"*"})
    10.7 -@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
    10.8 +@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_7)
    10.9  public class b6341534 extends AbstractProcessor {
   10.10      static int r = 0;
   10.11      static Elements E = null;
    11.1 --- a/test/tools/javac/processing/T6439826.java	Wed May 20 13:36:23 2009 -0700
    11.2 +++ b/test/tools/javac/processing/T6439826.java	Wed May 20 19:10:06 2009 -0700
    11.3 @@ -39,7 +39,7 @@
    11.4  
    11.5  
    11.6  @SupportedAnnotationTypes("*")
    11.7 -@SupportedSourceVersion(SourceVersion.RELEASE_6 )
    11.8 +@SupportedSourceVersion(SourceVersion.RELEASE_7 )
    11.9  public class T6439826 extends AbstractProcessor {
   11.10      public static void main(String... args) {
   11.11          String testSrc = System.getProperty("test.src", ".");
    12.1 --- a/test/tools/javac/stackmap/T4955930.sh	Wed May 20 13:36:23 2009 -0700
    12.2 +++ b/test/tools/javac/stackmap/T4955930.sh	Wed May 20 19:10:06 2009 -0700
    12.3 @@ -56,7 +56,7 @@
    12.4  TMP1=T4955930.javap
    12.5  
    12.6  cp "${TESTSRC}${FS}T4955930.java" .
    12.7 -"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -target 6 T4955930.java
    12.8 +"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -source 6 -target 6 T4955930.java
    12.9  result=$?
   12.10  if [ $result -ne 0 ]
   12.11  then
    13.1 --- a/test/tools/javac/versions/check.sh	Wed May 20 13:36:23 2009 -0700
    13.2 +++ b/test/tools/javac/versions/check.sh	Wed May 20 19:10:06 2009 -0700
    13.3 @@ -24,9 +24,8 @@
    13.4  # @test
    13.5  # @bug 4981566 5028634 5094412 6304984
    13.6  # @summary Check interpretation of -target and -source options
    13.7 -#
    13.8  # @build CheckClassFileVersion
    13.9 -# @run shell check.sh
   13.10 +# @run shell check.sh 
   13.11  
   13.12  TESTJAVA=${TESTJAVA:?}
   13.13  TC=${TESTCLASSES-.}
   13.14 @@ -48,19 +47,26 @@
   13.15    $JC ${TESTTOOLVMOPTS} -d $TC $* $TC/X.java && $CFV $TC/X.class $V || exit 2
   13.16  }
   13.17  
   13.18 -check 50.0
   13.19  check 48.0 -source 1.4
   13.20 +
   13.21  check 49.0 -source 1.4 -target 1.5
   13.22 -check 49.0 -target 1.5
   13.23 -check 50.0 -source 1.5
   13.24 -check 50.0 -target 1.6
   13.25 -check 50.0 -target 6
   13.26 -check 50.0 -source 1.6
   13.27 -check 50.0 -source 6
   13.28 +check 49.0 -source 1.5 -target 1.5
   13.29 +
   13.30 +check 50.0 -source 1.4 -target 1.6
   13.31 +check 50.0 -source 1.5 -target 1.6
   13.32 +check 50.0 -source 1.6 -target 1.6
   13.33 +check 50.0 -source 1.6 -target 6
   13.34 +check 50.0 -source 6 -target 1.6
   13.35 +check 50.0 -source 6 -target 6
   13.36 +
   13.37 +check 51.0
   13.38 +check 51.0 -source 1.5
   13.39 +check 51.0 -source 1.6
   13.40 +check 51.0 -source 6
   13.41 +check 51.0 -source 1.7
   13.42 +check 51.0 -source 7
   13.43  check 51.0 -target 1.7
   13.44  check 51.0 -target 7
   13.45 -check 51.0 -source 1.7
   13.46 -check 51.0 -source 7
   13.47  
   13.48  
   13.49  # Check source versions
   13.50 @@ -85,21 +91,30 @@
   13.51    fi
   13.52  }
   13.53  
   13.54 +# the following need to be updated when -source 7 features are available
   13.55  checksrc14() { pass $* $TC/X.java; fail $* $TC/Y.java; }
   13.56  checksrc15() { pass $* $TC/X.java; pass $* $TC/Y.java; }
   13.57  checksrc16() { checksrc15 $* ; }
   13.58 +checksrc17() { checksrc15 $* ; }
   13.59  
   13.60  checksrc14 -source 1.4
   13.61  checksrc14 -source 1.4 -target 1.5
   13.62  
   13.63 -checksrc15
   13.64 -checksrc15 -target 1.5
   13.65  checksrc15 -source 1.5
   13.66 +checksrc15 -source 1.5 -target 1.5
   13.67  
   13.68 -checksrc16 -target 1.6
   13.69 -checksrc16 -target 6
   13.70  checksrc16 -source 1.6
   13.71  checksrc16 -source 6
   13.72 +checksrc16 -source 1.6 -target 1.6
   13.73 +checksrc16 -source 6 -target 6
   13.74 +
   13.75 +checksrc17
   13.76 +checksrc17 -target 1.7
   13.77 +checksrc17 -target 7
   13.78 +checksrc17 -source 1.7
   13.79 +checksrc17 -source 7
   13.80 +checksrc17 -source 1.7 -target 1.7
   13.81 +checksrc17 -source 7 -target 7
   13.82  
   13.83  fail -source 1.5 -target 1.4 $TC/X.java
   13.84  fail -source 1.6 -target 1.4 $TC/X.java

mercurial