mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
6843648: tools/javac/versions/check.sh is broken
Reviewed-by: darcy
This commit is contained in:
parent
6fbe9f979e
commit
db4ff5c63b
13 changed files with 43 additions and 28 deletions
|
@ -27,7 +27,7 @@ import javax.lang.model.*;
|
|||
import javax.lang.model.element.*;
|
||||
|
||||
@SupportedAnnotationTypes("*")
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_6)
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_7)
|
||||
public class Anno extends AbstractProcessor {
|
||||
public boolean process(Set<? extends TypeElement> annotations,
|
||||
RoundEnvironment roundEnv) {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 6464451
|
||||
* @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
|
||||
* @author Wei Tao
|
||||
* @compile -target 5 BigFinally.java
|
||||
* @compile -source 5 -target 5 BigFinally.java
|
||||
* @clean BigFinally
|
||||
* @compile/fail BigFinally.java
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 6464451
|
||||
* @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
|
||||
* @author Wei Tao
|
||||
* @compile -target 5 DeepNestedFinally.java
|
||||
* @compile -source 5 -target 5 DeepNestedFinally.java
|
||||
* @clean DeepNestedFinally
|
||||
* @compile/fail DeepNestedFinally.java
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 6464451
|
||||
* @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
|
||||
* @author Wei Tao
|
||||
* @compile -target 5 ManyExitsInTry.java
|
||||
* @compile -source 5 -target 5 ManyExitsInTry.java
|
||||
* @clean ManyExitsInTry
|
||||
* @compile/fail ManyExitsInTry.java
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* @summary Use ldc instruction for class literals
|
||||
* @author gafter
|
||||
*
|
||||
* @compile -target 1.5 ClassLit.java
|
||||
* @compile -source 1.5 -target 1.5 ClassLit.java
|
||||
* @run main ClassLit
|
||||
*/
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
/*
|
||||
* @test
|
||||
* @bug 6557865
|
||||
* @summary -target 5 should not put ACC_SYNTHETIC on package-info
|
||||
* @summary -source 5 -target 5 should not put ACC_SYNTHETIC on package-info
|
||||
* @author Wei Tao
|
||||
* @compile T6557865.java
|
||||
* @compile -target 5 T6232928/package-info.java
|
||||
* @compile -source 5 -target 5 T6232928/package-info.java
|
||||
* @run main T6557865
|
||||
*/
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @bug 6682380 6679509
|
||||
* @summary Foreach loop with generics inside finally block crashes javac with -target 1.5
|
||||
* @author Jan Lahoda, Maurizio Cimadamore
|
||||
* @compile -target 1.5 T6682380.java
|
||||
* @compile -source 1.5 -target 1.5 T6682380.java
|
||||
*/
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -28,7 +28,7 @@ import javax.lang.model.*;
|
|||
import javax.lang.model.element.*;
|
||||
|
||||
@SupportedAnnotationTypes("*")
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_6)
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_7)
|
||||
public class A extends AbstractProcessor {
|
||||
public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
|
||||
Filer filer = processingEnv.getFiler();
|
||||
|
|
|
@ -30,7 +30,7 @@ import javax.lang.model.element.*;
|
|||
import javax.tools.*;
|
||||
|
||||
@SupportedAnnotationTypes("*")
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_6)
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_7)
|
||||
public class A extends AbstractProcessor {
|
||||
|
||||
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.*;
|
|||
import java.util.Set;
|
||||
|
||||
@SupportedAnnotationTypes({"*"})
|
||||
@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
|
||||
@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_7)
|
||||
public class b6341534 extends AbstractProcessor {
|
||||
static int r = 0;
|
||||
static Elements E = null;
|
||||
|
|
|
@ -39,7 +39,7 @@ import static javax.lang.model.util.ElementFilter.*;
|
|||
|
||||
|
||||
@SupportedAnnotationTypes("*")
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_6 )
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_7 )
|
||||
public class T6439826 extends AbstractProcessor {
|
||||
public static void main(String... args) {
|
||||
String testSrc = System.getProperty("test.src", ".");
|
||||
|
|
|
@ -56,7 +56,7 @@ esac
|
|||
TMP1=T4955930.javap
|
||||
|
||||
cp "${TESTSRC}${FS}T4955930.java" .
|
||||
"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -target 6 T4955930.java
|
||||
"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -source 6 -target 6 T4955930.java
|
||||
result=$?
|
||||
if [ $result -ne 0 ]
|
||||
then
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
# @test
|
||||
# @bug 4981566 5028634 5094412 6304984
|
||||
# @summary Check interpretation of -target and -source options
|
||||
#
|
||||
# @build CheckClassFileVersion
|
||||
# @run shell check.sh
|
||||
|
||||
|
@ -48,19 +47,26 @@ check() {
|
|||
$JC ${TESTTOOLVMOPTS} -d $TC $* $TC/X.java && $CFV $TC/X.class $V || exit 2
|
||||
}
|
||||
|
||||
check 50.0
|
||||
check 48.0 -source 1.4
|
||||
|
||||
check 49.0 -source 1.4 -target 1.5
|
||||
check 49.0 -target 1.5
|
||||
check 50.0 -source 1.5
|
||||
check 50.0 -target 1.6
|
||||
check 50.0 -target 6
|
||||
check 50.0 -source 1.6
|
||||
check 50.0 -source 6
|
||||
check 51.0 -target 1.7
|
||||
check 51.0 -target 7
|
||||
check 49.0 -source 1.5 -target 1.5
|
||||
|
||||
check 50.0 -source 1.4 -target 1.6
|
||||
check 50.0 -source 1.5 -target 1.6
|
||||
check 50.0 -source 1.6 -target 1.6
|
||||
check 50.0 -source 1.6 -target 6
|
||||
check 50.0 -source 6 -target 1.6
|
||||
check 50.0 -source 6 -target 6
|
||||
|
||||
check 51.0
|
||||
check 51.0 -source 1.5
|
||||
check 51.0 -source 1.6
|
||||
check 51.0 -source 6
|
||||
check 51.0 -source 1.7
|
||||
check 51.0 -source 7
|
||||
check 51.0 -target 1.7
|
||||
check 51.0 -target 7
|
||||
|
||||
|
||||
# Check source versions
|
||||
|
@ -85,21 +91,30 @@ pass() {
|
|||
fi
|
||||
}
|
||||
|
||||
# the following need to be updated when -source 7 features are available
|
||||
checksrc14() { pass $* $TC/X.java; fail $* $TC/Y.java; }
|
||||
checksrc15() { pass $* $TC/X.java; pass $* $TC/Y.java; }
|
||||
checksrc16() { checksrc15 $* ; }
|
||||
checksrc17() { checksrc15 $* ; }
|
||||
|
||||
checksrc14 -source 1.4
|
||||
checksrc14 -source 1.4 -target 1.5
|
||||
|
||||
checksrc15
|
||||
checksrc15 -target 1.5
|
||||
checksrc15 -source 1.5
|
||||
checksrc15 -source 1.5 -target 1.5
|
||||
|
||||
checksrc16 -target 1.6
|
||||
checksrc16 -target 6
|
||||
checksrc16 -source 1.6
|
||||
checksrc16 -source 6
|
||||
checksrc16 -source 1.6 -target 1.6
|
||||
checksrc16 -source 6 -target 6
|
||||
|
||||
checksrc17
|
||||
checksrc17 -target 1.7
|
||||
checksrc17 -target 7
|
||||
checksrc17 -source 1.7
|
||||
checksrc17 -source 7
|
||||
checksrc17 -source 1.7 -target 1.7
|
||||
checksrc17 -source 7 -target 7
|
||||
|
||||
fail -source 1.5 -target 1.4 $TC/X.java
|
||||
fail -source 1.6 -target 1.4 $TC/X.java
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue