8290901: Reduce use of -source in langtools tests

Reviewed-by: jjg
This commit is contained in:
Joe Darcy 2022-07-29 17:35:22 +00:00
parent 64a1a08ff9
commit cc2861a993
81 changed files with 108 additions and 128 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
* @test * @test
* @bug 8074306 8073432 8074501 * @bug 8074306 8073432 8074501
* @summary NULLCHK is emitted as Object.getClass * @summary NULLCHK is emitted as Object.getClass
* @compile -source 7 -target 7 TestSyntheticNullChecks.java * @compile --release 7 TestSyntheticNullChecks.java
* @run main TestSyntheticNullChecks 7 * @run main TestSyntheticNullChecks 7
* @clean * * @clean *
* @compile TestSyntheticNullChecks.java * @compile TestSyntheticNullChecks.java

View file

@ -4,7 +4,7 @@
* @summary Verify that an anonymous class can contain a static field only if source >= 16 * @summary Verify that an anonymous class can contain a static field only if source >= 16
* @author maddox * @author maddox
* *
* @compile/fail/ref=AnonStaticMember_1.out -source 15 -XDrawDiagnostics AnonStaticMember_1.java * @compile/fail/ref=AnonStaticMember_1.out --release 15 -XDrawDiagnostics AnonStaticMember_1.java
* @compile AnonStaticMember_1.java * @compile AnonStaticMember_1.java
*/ */

View file

@ -1,4 +1,2 @@
- compiler.warn.source.no.system.modules.path: 15
AnonStaticMember_1.java:13:20: compiler.err.icls.cant.have.static.decl: compiler.misc.anonymous.class: AnonStaticMember_1$1 AnonStaticMember_1.java:13:20: compiler.err.icls.cant.have.static.decl: compiler.misc.anonymous.class: AnonStaticMember_1$1
1 error 1 error
1 warning

View file

@ -4,7 +4,7 @@
* @summary Verify that an anonymous class can contain a static method only if source >= 16 * @summary Verify that an anonymous class can contain a static method only if source >= 16
* @author maddox * @author maddox
* *
* @compile/fail/ref=AnonStaticMember_2.out -source 15 -XDrawDiagnostics AnonStaticMember_2.java * @compile/fail/ref=AnonStaticMember_2.out --release 15 -XDrawDiagnostics AnonStaticMember_2.java
* @compile AnonStaticMember_2.java * @compile AnonStaticMember_2.java
*/ */

View file

@ -1,4 +1,2 @@
- compiler.warn.source.no.system.modules.path: 15
AnonStaticMember_2.java:13:21: compiler.err.icls.cant.have.static.decl: compiler.misc.anonymous.class: AnonStaticMember_2$1 AnonStaticMember_2.java:13:21: compiler.err.icls.cant.have.static.decl: compiler.misc.anonymous.class: AnonStaticMember_2$1
1 error 1 error
1 warning

View file

@ -4,7 +4,7 @@
* @summary Verify rejection of illegal static variables in inner classes. * @summary Verify rejection of illegal static variables in inner classes.
* @author William Maddox (maddox) * @author William Maddox (maddox)
* *
* @compile/fail/ref=InnerNamedConstant_2_A.out -XDrawDiagnostics -source 15 InnerNamedConstant_2.java * @compile/fail/ref=InnerNamedConstant_2_A.out -XDrawDiagnostics --release 15 InnerNamedConstant_2.java
* @compile/fail/ref=InnerNamedConstant_2_B.out -XDrawDiagnostics InnerNamedConstant_2.java * @compile/fail/ref=InnerNamedConstant_2_B.out -XDrawDiagnostics InnerNamedConstant_2.java
*/ */

View file

@ -1,7 +1,5 @@
- compiler.warn.source.no.system.modules.path: 15
InnerNamedConstant_2.java:23:20: compiler.err.icls.cant.have.static.decl: InnerNamedConstant_2.Inner2 InnerNamedConstant_2.java:23:20: compiler.err.icls.cant.have.static.decl: InnerNamedConstant_2.Inner2
InnerNamedConstant_2.java:24:29: compiler.err.icls.cant.have.static.decl: InnerNamedConstant_2.Inner2 InnerNamedConstant_2.java:24:29: compiler.err.icls.cant.have.static.decl: InnerNamedConstant_2.Inner2
InnerNamedConstant_2.java:26:13: compiler.err.cant.assign.val.to.final.var: z InnerNamedConstant_2.java:26:13: compiler.err.cant.assign.val.to.final.var: z
InnerNamedConstant_2.java:35:26: compiler.err.icls.cant.have.static.decl: InnerNamedConstant_2.Inner3 InnerNamedConstant_2.java:35:26: compiler.err.icls.cant.have.static.decl: InnerNamedConstant_2.Inner3
4 errors 4 errors
1 warning

View file

@ -1,10 +1,10 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 4063740 6969184 * @bug 4063740 6969184
* @summary Interfaces can be declared in inner classes only for source >= 16 * @summary Interfaces can be declared in inner classes only for release >= 16
* @author turnidge * @author turnidge
* *
* @compile/fail/ref=InterfaceInInner.out -XDrawDiagnostics -source 15 InterfaceInInner.java * @compile/fail/ref=InterfaceInInner.out -XDrawDiagnostics --release 15 InterfaceInInner.java
* @compile InterfaceInInner.java * @compile InterfaceInInner.java
*/ */
class InterfaceInInner { class InterfaceInInner {

View file

@ -1,4 +1,2 @@
- compiler.warn.source.no.system.modules.path: 15
InterfaceInInner.java:13:13: compiler.err.icls.cant.have.static.decl: foo InterfaceInInner.java:13:13: compiler.err.icls.cant.have.static.decl: foo
1 error 1 error
1 warning

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8242478 8246774 * @bug 8242478 8246774
* @summary test for local interfaces * @summary test for local interfaces
* @compile/fail/ref=LocalInterface.out -XDrawDiagnostics -source 15 LocalInterface.java * @compile/fail/ref=LocalInterface.out -XDrawDiagnostics --release 15 LocalInterface.java
* @compile LocalInterface.java * @compile LocalInterface.java
*/ */
class LocalInterface { class LocalInterface {

View file

@ -1,4 +1,2 @@
- compiler.warn.source.no.system.modules.path: 15
LocalInterface.java:10:9: compiler.err.intf.not.allowed.here LocalInterface.java:10:9: compiler.err.intf.not.allowed.here
1 error 1 error
1 warning

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,15 +43,15 @@ import java.io.File;
* @run main TestIndyStringConcat false * @run main TestIndyStringConcat false
* *
* @clean * * @clean *
* @compile -XDstringConcat=inline -source 9 -target 9 TestIndyStringConcat.java * @compile -XDstringConcat=inline TestIndyStringConcat.java
* @run main TestIndyStringConcat false * @run main TestIndyStringConcat false
* *
* @clean * * @clean *
* @compile -XDstringConcat=indy -source 9 -target 9 TestIndyStringConcat.java * @compile -XDstringConcat=indy TestIndyStringConcat.java
* @run main TestIndyStringConcat true * @run main TestIndyStringConcat true
* *
* @clean * * @clean *
* @compile -XDstringConcat=indyWithConstants -source 9 -target 9 TestIndyStringConcat.java * @compile -XDstringConcat=indyWithConstants TestIndyStringConcat.java
* @run main TestIndyStringConcat true * @run main TestIndyStringConcat true
*/ */
public class TestIndyStringConcat { public class TestIndyStringConcat {

View file

@ -1,7 +1,7 @@
/* @test /nodynamiccopyright/ /* @test /nodynamiccopyright/
* @bug 7196163 * @bug 7196163
* @summary Verify that variables can be used as operands to try-with-resources * @summary Verify that variables can be used as operands to try-with-resources
* @compile/fail/ref=TwrForVariable1.out -source 8 -XDrawDiagnostics -Xlint:-options TwrForVariable1.java * @compile/fail/ref=TwrForVariable1.out --release 8 -XDrawDiagnostics TwrForVariable1.java
* @compile TwrForVariable1.java * @compile TwrForVariable1.java
* @run main TwrForVariable1 * @run main TwrForVariable1
*/ */

View file

@ -1,10 +1,10 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8211102 * @bug 8211102
* @summary Ensure that the lambda analyzer does not run when -source 7 is specified, * @summary Ensure that the lambda analyzer does not run when --release 7 is specified,
* even if explicitly requested * even if explicitly requested
* @compile/fail/ref=AnalyzersCheckSourceLevel.out -Werror -XDfind=lambda -XDrawDiagnostics AnalyzersCheckSourceLevel.java * @compile/fail/ref=AnalyzersCheckSourceLevel.out -Werror -XDfind=lambda -XDrawDiagnostics AnalyzersCheckSourceLevel.java
* @compile -Werror -source 7 -Xlint:-options -XDfind=lambda AnalyzersCheckSourceLevel.java * @compile -Werror --release 7 -Xlint:-options -XDfind=lambda AnalyzersCheckSourceLevel.java
*/ */
public class AnalyzersCheckSourceLevel { public class AnalyzersCheckSourceLevel {
void t() { void t() {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
* @test * @test
* @bug 8211102 * @bug 8211102
* @summary Verify javac does not crash in lambda analyzer * @summary Verify javac does not crash in lambda analyzer
* @compile -Werror -XDfind=lambda -source 7 -Xlint:-options T8211102.java * @compile -Werror -XDfind=lambda --release 7 -Xlint:-options T8211102.java
*/ */
import java.util.*; import java.util.*;

View file

@ -3,7 +3,7 @@
* @bug 8138822 * @bug 8138822
* @summary test that only Java 8+ allows repeating annotations * @summary test that only Java 8+ allows repeating annotations
* @compile WrongVersion.java * @compile WrongVersion.java
* @compile -Xlint:-options -source 8 WrongVersion.java * @compile --release 8 WrongVersion.java
* @compile/fail/ref=WrongVersion7.out -XDrawDiagnostics -Xlint:-options -source 7 WrongVersion.java * @compile/fail/ref=WrongVersion7.out -XDrawDiagnostics -Xlint:-options -source 7 WrongVersion.java
*/ */
import java.lang.annotation.Repeatable; import java.lang.annotation.Repeatable;

View file

@ -4,7 +4,7 @@
* @summary test that only Java 8 allows type annotations * @summary test that only Java 8 allows type annotations
* @author Mahmood Ali * @author Mahmood Ali
* @compile AnnotationVersion.java * @compile AnnotationVersion.java
* @compile/fail/ref=AnnotationVersion7.out -XDrawDiagnostics -Xlint:-options -source 1.7 AnnotationVersion.java * @compile/fail/ref=AnnotationVersion7.out -XDrawDiagnostics -Xlint:-options --release 7 AnnotationVersion.java
*/ */
import java.lang.annotation.*; import java.lang.annotation.*;

View file

@ -5,7 +5,7 @@
* @author Tim Hanson, BEA * @author Tim Hanson, BEA
* *
* @compile Conditional.java * @compile Conditional.java
* @compile/fail/ref=Conditional.out -XDrawDiagnostics -source 7 -Xlint:-options Conditional.java * @compile/fail/ref=Conditional.out -XDrawDiagnostics --release 7 -Xlint:-options Conditional.java
*/ */
import java.util.*; import java.util.*;

View file

@ -5,7 +5,7 @@
* @author gafter * @author gafter
* *
* @compile/ref=SuppressDeprecation.out -Xlint:deprecation -XDrawDiagnostics SuppressDeprecation.java * @compile/ref=SuppressDeprecation.out -Xlint:deprecation -XDrawDiagnostics SuppressDeprecation.java
* @compile/ref=SuppressDeprecation8.out -source 8 -Xlint:deprecation -XDrawDiagnostics -Xlint:-options SuppressDeprecation.java * @compile/ref=SuppressDeprecation8.out --release 8 -Xlint:deprecation -XDrawDiagnostics SuppressDeprecation.java
*/ */
/* Test for the contexts in which deprecations warnings should /* Test for the contexts in which deprecations warnings should

View file

@ -3,7 +3,7 @@
* @bug 5019609 8246774 * @bug 5019609 8246774
* @summary javac fails to reject local enums * @summary javac fails to reject local enums
* @author gafter * @author gafter
* @compile/fail/ref=LocalEnum.out -XDrawDiagnostics -source 15 LocalEnum.java * @compile/fail/ref=LocalEnum.out -XDrawDiagnostics --release 15 LocalEnum.java
* @compile LocalEnum.java * @compile LocalEnum.java
*/ */

View file

@ -1,4 +1,2 @@
- compiler.warn.source.no.system.modules.path: 15
LocalEnum.java:12:9: compiler.err.local.enum LocalEnum.java:12:9: compiler.err.local.enum
1 error 1 error
1 warning

View file

@ -1,10 +1,10 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 5071831 * @bug 5071831
* @summary javac allows enum in an inner class for source >= 16 * @summary javac allows enum in an inner class for release >= 16
* @author gafter * @author gafter
* *
* @compile/fail/ref=NestedEnum.out -XDrawDiagnostics -source 15 NestedEnum.java * @compile/fail/ref=NestedEnum.out -XDrawDiagnostics --release 15 NestedEnum.java
* @compile NestedEnum.java * @compile NestedEnum.java
*/ */

View file

@ -1,4 +1,2 @@
- compiler.warn.source.no.system.modules.path: 15
NestedEnum.java:13:9: compiler.err.static.declaration.not.allowed.in.inner.classes NestedEnum.java:13:9: compiler.err.static.declaration.not.allowed.in.inner.classes
1 error 1 error
1 warning

View file

@ -3,7 +3,7 @@
* @bug 5081785 * @bug 5081785
* @summary enums should be allowed in non-static contexts * @summary enums should be allowed in non-static contexts
* @author Peter von der Ah\u00e9 * @author Peter von der Ah\u00e9
* @compile/fail/ref=T5081785.out -XDrawDiagnostics -source 15 T5081785.java * @compile/fail/ref=T5081785.out -XDrawDiagnostics --release 15 T5081785.java
* @compile T5081785.java * @compile T5081785.java
*/ */

View file

@ -1,7 +1,5 @@
- compiler.warn.source.no.system.modules.path: 15
T5081785.java:30:9: compiler.err.static.declaration.not.allowed.in.inner.classes T5081785.java:30:9: compiler.err.static.declaration.not.allowed.in.inner.classes
T5081785.java:13:13: compiler.err.static.declaration.not.allowed.in.inner.classes T5081785.java:13:13: compiler.err.static.declaration.not.allowed.in.inner.classes
T5081785.java:20:27: compiler.err.static.declaration.not.allowed.in.inner.classes T5081785.java:20:27: compiler.err.static.declaration.not.allowed.in.inner.classes
T5081785.java:25:31: compiler.err.static.declaration.not.allowed.in.inner.classes T5081785.java:25:31: compiler.err.static.declaration.not.allowed.in.inner.classes
4 errors 4 errors
1 warning

View file

@ -4,7 +4,7 @@
* *
* @summary javac fails to substitute type variables into a constructor's throws clause * @summary javac fails to substitute type variables into a constructor's throws clause
* @author Mark Mahieu * @author Mark Mahieu
* @compile/fail/ref=T6723444_1.out -Xlint:-options -source 7 -XDrawDiagnostics T6723444.java * @compile/fail/ref=T6723444_1.out -Xlint:-options --release 7 -XDrawDiagnostics T6723444.java
* @compile/fail/ref=T6723444_2.out -XDrawDiagnostics T6723444.java * @compile/fail/ref=T6723444_2.out -XDrawDiagnostics T6723444.java
* *
*/ */

View file

@ -4,7 +4,7 @@
* *
* @summary Incorrect thrown type determined for unchecked invocations * @summary Incorrect thrown type determined for unchecked invocations
* @author Daniel Smith * @author Daniel Smith
* @compile/fail/ref=T7015430_1.out -source 7 -Xlint:-options,unchecked -XDrawDiagnostics T7015430.java * @compile/fail/ref=T7015430_1.out --release 7 -Xlint:-options,unchecked -XDrawDiagnostics T7015430.java
* @compile/fail/ref=T7015430_2.out -Xlint:unchecked -XDrawDiagnostics T7015430.java * @compile/fail/ref=T7015430_2.out -Xlint:unchecked -XDrawDiagnostics T7015430.java
* *
*/ */

View file

@ -3,7 +3,7 @@
* @bug 7022054 * @bug 7022054
* *
* @summary Invalid compiler error on covariant overriding methods with the same erasure * @summary Invalid compiler error on covariant overriding methods with the same erasure
* @compile -source 7 T7022054pos1.java * @compile --release 7 T7022054pos1.java
* @compile/fail/ref=T7022054pos1.out -XDrawDiagnostics T7022054pos1.java * @compile/fail/ref=T7022054pos1.out -XDrawDiagnostics T7022054pos1.java
* *
*/ */

View file

@ -3,7 +3,7 @@
* @bug 7022054 * @bug 7022054
* *
* @summary Invalid compiler error on covariant overriding methods with the same erasure * @summary Invalid compiler error on covariant overriding methods with the same erasure
* @compile -source 7 T7022054pos2.java * @compile --release 7 T7022054pos2.java
* @compile/fail/ref=T7022054pos2.out -XDrawDiagnostics T7022054pos2.java * @compile/fail/ref=T7022054pos2.out -XDrawDiagnostics T7022054pos2.java
*/ */

View file

@ -4,7 +4,7 @@
* @summary the type in an instanceof expression must be reifiable * @summary the type in an instanceof expression must be reifiable
* @author seligman * @author seligman
* *
* @compile/fail/ref=InstanceOf3.out -XDrawDiagnostics -source 15 -Xlint:-options InstanceOf3.java * @compile/fail/ref=InstanceOf3.out -XDrawDiagnostics --release 15 InstanceOf3.java
*/ */
public class InstanceOf3 { public class InstanceOf3 {

View file

@ -4,9 +4,9 @@
* *
* @summary add a warning to detect diamond sites (including anonymous class instance creation at source >= 9) * @summary add a warning to detect diamond sites (including anonymous class instance creation at source >= 9)
* @author mcimadamore * @author mcimadamore
* @compile/ref=T6939780_7.out -Xlint:-options -source 7 T6939780.java -XDrawDiagnostics -XDfind=diamond * @compile/ref=T6939780_7.out -Xlint:-options --release 7 T6939780.java -XDrawDiagnostics -XDfind=diamond
* @compile/ref=T6939780_8.out -Xlint:-options -source 8 T6939780.java -XDrawDiagnostics -XDfind=diamond * @compile/ref=T6939780_8.out --release 8 T6939780.java -XDrawDiagnostics -XDfind=diamond
* @compile/ref=T6939780_9.out -Xlint:-options -source 9 T6939780.java -XDrawDiagnostics -XDfind=diamond * @compile/ref=T6939780_9.out T6939780.java -XDrawDiagnostics -XDfind=diamond
* *
*/ */

View file

@ -4,8 +4,7 @@
* *
* @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9 * @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9
* @author Maurizio Cimadamore * @author Maurizio Cimadamore
* @compile/fail/ref=Neg09a.out Neg09a.java -source 8 -XDrawDiagnostics -Xlint:-options * @compile/fail/ref=Neg09a.out Neg09a.java --release 8 -XDrawDiagnostics
*
*/ */
class Neg09a { class Neg09a {

View file

@ -1,2 +1,2 @@
Neg09a.java:15:34: compiler.err.cant.apply.diamond.1: Neg09a.Member<X>, (compiler.misc.feature.not.supported.in.source: (compiler.misc.feature.diamond.and.anon.class), 8, 9) Neg09a.java:14:34: compiler.err.cant.apply.diamond.1: Neg09a.Member<X>, (compiler.misc.feature.not.supported.in.source: (compiler.misc.feature.diamond.and.anon.class), 8, 9)
1 error 1 error

View file

@ -4,8 +4,7 @@
* *
* @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9 * @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9
* @author Maurizio Cimadamore * @author Maurizio Cimadamore
* @compile/fail/ref=Neg09b.out Neg09b.java -source 8 -XDrawDiagnostics -Xlint:-options * @compile/fail/ref=Neg09b.out Neg09b.java --release 8 -XDrawDiagnostics
*
*/ */
class Neg09b { class Neg09b {

View file

@ -1,2 +1,2 @@
Neg09b.java:16:34: compiler.err.cant.apply.diamond.1: Neg09b.Nested<X>, (compiler.misc.feature.not.supported.in.source: (compiler.misc.feature.diamond.and.anon.class), 8, 9) Neg09b.java:15:34: compiler.err.cant.apply.diamond.1: Neg09b.Nested<X>, (compiler.misc.feature.not.supported.in.source: (compiler.misc.feature.diamond.and.anon.class), 8, 9)
1 error 1 error

View file

@ -4,8 +4,7 @@
* *
* @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9 * @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9
* @author Maurizio Cimadamore * @author Maurizio Cimadamore
* @compile/fail/ref=Neg09c.out Neg09c.java -source 8 -XDrawDiagnostics -Xlint:-options * @compile/fail/ref=Neg09c.out Neg09c.java --release 8 -XDrawDiagnostics
*
*/ */
class Neg09c { class Neg09c {

View file

@ -1,2 +1,2 @@
Neg09c.java:15:39: compiler.err.cant.apply.diamond.1: Neg09c.Member<X>, (compiler.misc.feature.not.supported.in.source: (compiler.misc.feature.diamond.and.anon.class), 8, 9) Neg09c.java:14:39: compiler.err.cant.apply.diamond.1: Neg09c.Member<X>, (compiler.misc.feature.not.supported.in.source: (compiler.misc.feature.diamond.and.anon.class), 8, 9)
1 error 1 error

View file

@ -4,8 +4,7 @@
* *
* @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9 * @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9
* @author Maurizio Cimadamore * @author Maurizio Cimadamore
* @compile/fail/ref=Neg09d.out Neg09d.java -source 8 -XDrawDiagnostics -Xlint:-options * @compile/fail/ref=Neg09d.out Neg09d.java --release 8 -XDrawDiagnostics
*
*/ */
class Neg09d { class Neg09d {

View file

@ -1,2 +1,2 @@
Neg09d.java:16:33: compiler.err.doesnt.exist: Neg09 Neg09d.java:15:33: compiler.err.doesnt.exist: Neg09
1 error 1 error

View file

@ -4,7 +4,7 @@
* *
* @summary Check that 'complex' diamond can infer type that is too specific * @summary Check that 'complex' diamond can infer type that is too specific
* @author mcimadamore * @author mcimadamore
* @compile/fail/ref=Neg10.out -source 7 -Xlint:-options Neg10.java -XDrawDiagnostics * @compile/fail/ref=Neg10.out --release 7 -Xlint:-options Neg10.java -XDrawDiagnostics
* @compile Neg10.java -XDrawDiagnostics * @compile Neg10.java -XDrawDiagnostics
* *
*/ */

View file

@ -3,7 +3,7 @@
* @bug 6278587 8007464 * @bug 6278587 8007464
* @summary Inference broken for subtypes of subtypes of F-bounded types * @summary Inference broken for subtypes of subtypes of F-bounded types
* @author Peter von der Ah\u00e9 * @author Peter von der Ah\u00e9
* @compile/fail/ref=T6278587Neg.out -XDrawDiagnostics -source 7 -Xlint:-options T6278587Neg.java * @compile/fail/ref=T6278587Neg.out -XDrawDiagnostics --release 7 -Xlint:-options T6278587Neg.java
* @compile T6278587Neg.java * @compile T6278587Neg.java
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 7154127 8007464 * @bug 7154127 8007464
* @summary Inference cleanup: remove bound check analysis from visitors in Types.java * @summary Inference cleanup: remove bound check analysis from visitors in Types.java
* @compile/fail/ref=T7154127.out -Xlint:-options -source 7 -XDrawDiagnostics T7154127.java * @compile/fail/ref=T7154127.out -Xlint:-options --release 7 -XDrawDiagnostics T7154127.java
* @compile T7154127.java * @compile T7154127.java
*/ */
class T7154127 { class T7154127 {

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 7177306 8007464 * @bug 7177306 8007464
* @summary Regression: unchecked method call does not erase return type * @summary Regression: unchecked method call does not erase return type
* @compile/fail/ref=T7177306e_7.out -XDrawDiagnostics -source 7 -Xlint:-options -XDrawDiagnostics T7177306e.java * @compile/fail/ref=T7177306e_7.out -XDrawDiagnostics --release 7 -Xlint:-options -XDrawDiagnostics T7177306e.java
* @compile/fail/ref=T7177306e.out -XDrawDiagnostics T7177306e.java * @compile/fail/ref=T7177306e.out -XDrawDiagnostics T7177306e.java
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8015505 * @bug 8015505
* @summary Spurious inference error when return type of generic method requires unchecked conversion to target * @summary Spurious inference error when return type of generic method requires unchecked conversion to target
* @compile/fail/ref=T8015505.out -Xlint:-options -source 7 -XDrawDiagnostics T8015505.java * @compile/fail/ref=T8015505.out -Xlint:-options --release 7 -XDrawDiagnostics T8015505.java
* @compile T8015505.java * @compile T8015505.java
*/ */

View file

@ -3,8 +3,8 @@
* @bug 8043893 * @bug 8043893
* @summary Inference doesn't report error on incompatible upper bounds * @summary Inference doesn't report error on incompatible upper bounds
* *
* @compile -source 7 T8043893.java * @compile --release 7 T8043893.java
* @compile/fail/ref=T8043893.out -Xlint:-options -XDrawDiagnostics -source 8 T8043893.java * @compile/fail/ref=T8043893.out -XDrawDiagnostics T8043893.java
*/ */
class T8043893<X> { class T8043893<X> {

View file

@ -3,7 +3,7 @@
* @bug 8039214 * @bug 8039214
* @summary Capture variable as an inference variable's lower bound * @summary Capture variable as an inference variable's lower bound
* @compile CaptureLowerBound.java * @compile CaptureLowerBound.java
* @compile/fail/ref=CaptureLowerBound7.out -Xlint:-options -source 7 -XDrawDiagnostics CaptureLowerBound.java * @compile/fail/ref=CaptureLowerBound7.out -Xlint:-options --release 7 -XDrawDiagnostics CaptureLowerBound.java
*/ */
public class CaptureLowerBound { public class CaptureLowerBound {

View file

@ -3,7 +3,7 @@
* @bug 8075793 * @bug 8075793
* @summary Capture variable as an inference lower bound followed by an array write * @summary Capture variable as an inference lower bound followed by an array write
* @compile/fail/ref=CaptureLowerBoundArray.out -XDrawDiagnostics CaptureLowerBoundArray.java * @compile/fail/ref=CaptureLowerBoundArray.out -XDrawDiagnostics CaptureLowerBoundArray.java
* @compile -Xlint:-options -source 7 CaptureLowerBoundArray.java * @compile --release 7 CaptureLowerBoundArray.java
*/ */
class CaptureLowerBoundArray { class CaptureLowerBoundArray {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
* @bug 8075793 * @bug 8075793
* @summary Capture variable as an inference lower bound followed by an invariant assignment * @summary Capture variable as an inference lower bound followed by an invariant assignment
* @compile CaptureLowerBoundAssign.java * @compile CaptureLowerBoundAssign.java
* @compile -Xlint:-options -source 7 CaptureLowerBoundAssign.java * @compile --release 7 CaptureLowerBoundAssign.java
*/ */
class CaptureLowerBoundAssign { class CaptureLowerBoundAssign {

View file

@ -3,7 +3,7 @@
* @bug 8075793 * @bug 8075793
* @summary Capture variable as an inference lower bound followed by a member reference * @summary Capture variable as an inference lower bound followed by a member reference
* @compile/fail/ref=CaptureLowerBoundDeref.out -XDrawDiagnostics CaptureLowerBoundDeref.java * @compile/fail/ref=CaptureLowerBoundDeref.out -XDrawDiagnostics CaptureLowerBoundDeref.java
* @compile -Xlint:-options -source 7 CaptureLowerBoundDeref.java * @compile --release 7 CaptureLowerBoundDeref.java
*/ */
class CaptureLowerBoundDeref { class CaptureLowerBoundDeref {

View file

@ -3,7 +3,7 @@
* @bug 8039214 * @bug 8039214
* @summary Capture variable as an inference variable's lower bound * @summary Capture variable as an inference variable's lower bound
* @compile/fail/ref=CaptureLowerBoundNeg.out -XDrawDiagnostics CaptureLowerBoundNeg.java * @compile/fail/ref=CaptureLowerBoundNeg.out -XDrawDiagnostics CaptureLowerBoundNeg.java
* @compile -Xlint:-options -source 7 CaptureLowerBoundNeg.java * @compile --release 7 CaptureLowerBoundNeg.java
*/ */
public class CaptureLowerBoundNeg { public class CaptureLowerBoundNeg {

View file

@ -3,7 +3,7 @@
* @bug 8075793 * @bug 8075793
* @summary Capture variable as an inference upper bound followed by a member reference * @summary Capture variable as an inference upper bound followed by a member reference
* @compile/fail/ref=CaptureUpperBoundDeref.out -XDrawDiagnostics CaptureUpperBoundDeref.java * @compile/fail/ref=CaptureUpperBoundDeref.out -XDrawDiagnostics CaptureUpperBoundDeref.java
* @compile -Xlint:-options -source 7 CaptureUpperBoundDeref.java * @compile --release 7 CaptureUpperBoundDeref.java
*/ */
class CaptureUpperBoundDeref { class CaptureUpperBoundDeref {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
* @bug 8039214 * @bug 8039214
* @summary Capture variable passed through multiple levels of nested inference * @summary Capture variable passed through multiple levels of nested inference
* @compile NestedCapture.java * @compile NestedCapture.java
* @compile -Xlint:-options -source 7 NestedCapture.java * @compile --release 7 -Xlint:-options NestedCapture.java
*/ */
abstract class NestedCapture { abstract class NestedCapture {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
* @bug 8039214 * @bug 8039214
* @summary Nested generic methods that work on wildcard-parameterized types * @summary Nested generic methods that work on wildcard-parameterized types
* @compile NestedWildcards.java * @compile NestedWildcards.java
* @compile -Xlint:-options -source 7 NestedWildcards.java * @compile --release 7 NestedWildcards.java
*/ */
public class NestedWildcards { public class NestedWildcards {

View file

@ -3,7 +3,7 @@
* @summary Negative regression test from odersky * @summary Negative regression test from odersky
* @author odersky * @author odersky
* *
* @compile/fail/ref=BadTest-old.out -XDrawDiagnostics -source 15 -Xlint:-options BadTest.java * @compile/fail/ref=BadTest-old.out -XDrawDiagnostics --release 15 BadTest.java
* @compile/fail/ref=BadTest.out -XDrawDiagnostics BadTest.java * @compile/fail/ref=BadTest.out -XDrawDiagnostics BadTest.java
*/ */

View file

@ -4,7 +4,7 @@
* @summary Negative regression test from odersky * @summary Negative regression test from odersky
* @author odersky * @author odersky
* *
* @compile/fail/ref=BadTest4.out -XDrawDiagnostics -source 7 -Xlint:-options BadTest4.java * @compile/fail/ref=BadTest4.out -XDrawDiagnostics --release 7 -Xlint:-options BadTest4.java
* @compile BadTest4.java * @compile BadTest4.java
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 4869999 8193302 * @bug 4869999 8193302
* @summary Verify that the compiler does not prematurely decide a package is not observable. * @summary Verify that the compiler does not prematurely decide a package is not observable.
* @compile -source 8 -Xlint:-options ImportsObservable.java * @compile --release 8 ImportsObservable.java
* @compile/fail/ref=ImportsObservable.out -XDrawDiagnostics ImportsObservable.java * @compile/fail/ref=ImportsObservable.out -XDrawDiagnostics ImportsObservable.java
*/ */

View file

@ -4,7 +4,7 @@
* @summary Add lambda tests * @summary Add lambda tests
* Integrate effectively final check with DA/DU analysis * Integrate effectively final check with DA/DU analysis
* @compile/fail/ref=EffectivelyFinalTest01.out -XDrawDiagnostics EffectivelyFinalTest.java * @compile/fail/ref=EffectivelyFinalTest01.out -XDrawDiagnostics EffectivelyFinalTest.java
* @compile/fail/ref=EffectivelyFinalTest02.out -source 7 -Xlint:-options -XDrawDiagnostics EffectivelyFinalTest.java * @compile/fail/ref=EffectivelyFinalTest02.out --release 7 -Xlint:-options -XDrawDiagnostics EffectivelyFinalTest.java
*/ */
class EffectivelyFinalTest { class EffectivelyFinalTest {

View file

@ -3,7 +3,7 @@
* @bug 8007401 8007427 8061549 * @bug 8007401 8007427 8061549
* @author sogoel * @author sogoel
* @summary Test generation of warnings when '_' is used an identifier * @summary Test generation of warnings when '_' is used an identifier
* @compile/fail/ref=IdentifierTest8.out -source 8 -Xlint:-options -Werror -XDrawDiagnostics IdentifierTest.java * @compile/fail/ref=IdentifierTest8.out --release 8 -Werror -XDrawDiagnostics IdentifierTest.java
* @compile/fail/ref=IdentifierTest9.out -XDrawDiagnostics IdentifierTest.java * @compile/fail/ref=IdentifierTest9.out -XDrawDiagnostics IdentifierTest.java
*/ */

View file

@ -3,7 +3,7 @@
* @bug 8003280 * @bug 8003280
* @summary Add lambda tests * @summary Add lambda tests
* check that lambda features are not enabled with source < 8 * check that lambda features are not enabled with source < 8
* @compile/fail/ref=SourceLevelTest.out -XDrawDiagnostics -source 7 -Xlint:-options SourceLevelTest.java * @compile/fail/ref=SourceLevelTest.out -XDrawDiagnostics --release 7 -Xlint:-options SourceLevelTest.java
*/ */
class SourceLevelTest { class SourceLevelTest {

View file

@ -1,7 +1,7 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @summary Check usages of underscore as identifier generate warnings * @summary Check usages of underscore as identifier generate warnings
* @compile/fail/ref=UnderscoreAsIdent8.out -source 8 -Xlint:-options -XDrawDiagnostics -Werror UnderscoreAsIdent.java * @compile/fail/ref=UnderscoreAsIdent8.out --release 8 -XDrawDiagnostics -Werror UnderscoreAsIdent.java
* @compile/fail/ref=UnderscoreAsIdent9.out -XDrawDiagnostics -Werror UnderscoreAsIdent.java * @compile/fail/ref=UnderscoreAsIdent9.out -XDrawDiagnostics -Werror UnderscoreAsIdent.java
*/ */
package _._; package _._;

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8177466 * @bug 8177466
* @summary Add compiler support for local variable type-inference * @summary Add compiler support for local variable type-inference
* @compile -source 8 pkg/var.java * @compile --release 8 pkg/var.java
* @compile pkg/nested/var/A.java * @compile pkg/nested/var/A.java
* @compile/fail/ref=BadTypeReference.out -XDrawDiagnostics BadTypeReference.java * @compile/fail/ref=BadTypeReference.out -XDrawDiagnostics BadTypeReference.java
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8262891 * @bug 8262891
* @summary Check null handling for non-pattern switches. * @summary Check null handling for non-pattern switches.
* @compile/fail/ref=CaseDefault.out -source 16 -Xlint:-options -XDrawDiagnostics CaseDefault.java * @compile/fail/ref=CaseDefault.out --release 16 -XDrawDiagnostics CaseDefault.java
* @compile --enable-preview -source ${jdk.version} CaseDefault.java * @compile --enable-preview -source ${jdk.version} CaseDefault.java
* @run main/othervm --enable-preview CaseDefault * @run main/othervm --enable-preview CaseDefault
*/ */

View file

@ -1,8 +1,8 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @summary Verify behavior of total patterns in instanceof * @summary Verify behavior of total patterns in instanceof
* @compile/fail/ref=InstanceofTotalPattern-15.out -source 15 -Xlint:-options -XDrawDiagnostics InstanceofTotalPattern.java * @compile/fail/ref=InstanceofTotalPattern-15.out --release 15 -XDrawDiagnostics InstanceofTotalPattern.java
* @compile/fail/ref=InstanceofTotalPattern-16.out -source 16 -Xlint:-options -XDrawDiagnostics InstanceofTotalPattern.java * @compile/fail/ref=InstanceofTotalPattern-16.out --release 16 -XDrawDiagnostics InstanceofTotalPattern.java
* @compile/ref=InstanceofTotalPattern-preview.out --enable-preview -source ${jdk.version} -Xlint:-options,preview -XDrawDiagnostics InstanceofTotalPattern.java * @compile/ref=InstanceofTotalPattern-preview.out --enable-preview -source ${jdk.version} -Xlint:-options,preview -XDrawDiagnostics InstanceofTotalPattern.java
* @run main/othervm --enable-preview InstanceofTotalPattern * @run main/othervm --enable-preview InstanceofTotalPattern
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8231827 * @bug 8231827
* @summary Verify behavior w.r.t. non-reifiable types in instanceof * @summary Verify behavior w.r.t. non-reifiable types in instanceof
* @compile/fail/ref=ReifiableOld-old.out -source 15 -Xlint:-options -XDrawDiagnostics ReifiableOld.java * @compile/fail/ref=ReifiableOld-old.out --release 15 -XDrawDiagnostics ReifiableOld.java
* @compile/fail/ref=ReifiableOld.out -XDrawDiagnostics ReifiableOld.java * @compile/fail/ref=ReifiableOld.out -XDrawDiagnostics ReifiableOld.java
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8206986 8222169 8224031 8240964 8267119 8268670 * @bug 8206986 8222169 8224031 8240964 8267119 8268670
* @summary Check expression switch works. * @summary Check expression switch works.
* @compile/fail/ref=ExpressionSwitch-old.out -source 9 -Xlint:-options -XDrawDiagnostics ExpressionSwitch.java * @compile/fail/ref=ExpressionSwitch-old.out --release 9 -XDrawDiagnostics ExpressionSwitch.java
* @compile ExpressionSwitch.java * @compile ExpressionSwitch.java
* @run main ExpressionSwitch * @run main ExpressionSwitch
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8223305 8226522 * @bug 8223305 8226522
* @summary Verify correct warnings w.r.t. yield * @summary Verify correct warnings w.r.t. yield
* @compile/ref=WarnWrongYieldTest.out -Xlint:-options -source 13 -XDrawDiagnostics -XDshould-stop.ifError=ATTR -XDshould-stop.ifNoError=ATTR WarnWrongYieldTest.java * @compile/ref=WarnWrongYieldTest.out --release 13 -XDrawDiagnostics -XDshould-stop.ifError=ATTR -XDshould-stop.ifNoError=ATTR WarnWrongYieldTest.java
*/ */
package t; package t;

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8206986 * @bug 8206986
* @summary Verify cases with multiple labels work properly. * @summary Verify cases with multiple labels work properly.
* @compile/fail/ref=MultipleLabelsExpression-old.out -source 9 -Xlint:-options -XDrawDiagnostics MultipleLabelsExpression.java * @compile/fail/ref=MultipleLabelsExpression-old.out --release 9 -XDrawDiagnostics MultipleLabelsExpression.java
* @compile MultipleLabelsExpression.java * @compile MultipleLabelsExpression.java
* @run main MultipleLabelsExpression * @run main MultipleLabelsExpression
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8206986 * @bug 8206986
* @summary Verify cases with multiple labels work properly. * @summary Verify cases with multiple labels work properly.
* @compile/fail/ref=MultipleLabelsStatement-old.out -source 9 -Xlint:-options -XDrawDiagnostics MultipleLabelsStatement.java * @compile/fail/ref=MultipleLabelsStatement-old.out --release 9 -XDrawDiagnostics MultipleLabelsStatement.java
* @compile MultipleLabelsStatement.java * @compile MultipleLabelsStatement.java
* @run main MultipleLabelsStatement * @run main MultipleLabelsStatement
*/ */

View file

@ -2,7 +2,7 @@
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8206986 * @bug 8206986
* @summary Verify rule cases work properly. * @summary Verify rule cases work properly.
* @compile/fail/ref=SwitchStatementArrow-old.out -source 9 -Xlint:-options -XDrawDiagnostics SwitchStatementArrow.java * @compile/fail/ref=SwitchStatementArrow-old.out --release 9 -XDrawDiagnostics SwitchStatementArrow.java
* @compile SwitchStatementArrow.java * @compile SwitchStatementArrow.java
* @run main SwitchStatementArrow * @run main SwitchStatementArrow
*/ */

View file

@ -1,8 +1,8 @@
/* /*
* @test /nodynamiccopyright/ * @test /nodynamiccopyright/
* @bug 8206986 * @bug 8206986
* @summary Verify "case null" is not allowed for -source 16 * @summary Verify "case null" is not allowed for --release 16
* @compile/fail/ref=SwitchNullDisabled.out -XDrawDiagnostics -source 16 -Xlint:-options SwitchNullDisabled.java * @compile/fail/ref=SwitchNullDisabled.out -XDrawDiagnostics --release 16 SwitchNullDisabled.java
* @compile/fail/ref=SwitchNullDisabled-preview.out -XDrawDiagnostics SwitchNullDisabled.java * @compile/fail/ref=SwitchNullDisabled-preview.out -XDrawDiagnostics SwitchNullDisabled.java
* @compile --enable-preview -source ${jdk.version} SwitchNullDisabled.java * @compile --enable-preview -source ${jdk.version} SwitchNullDisabled.java
*/ */

View file

@ -3,7 +3,7 @@
* @bug 6313164 8036953 * @bug 6313164 8036953
* @author mcimadamore * @author mcimadamore
* @summary javac generates code that fails byte code verification for the varargs feature * @summary javac generates code that fails byte code verification for the varargs feature
* @compile/fail/ref=T6313164Source7.out -source 7 -XDrawDiagnostics -Xlint:-options T6313164.java * @compile/fail/ref=T6313164Source7.out --release 7 -XDrawDiagnostics -Xlint:-options T6313164.java
* @compile/fail/ref=T6313164Source8AndHigher.out -XDrawDiagnostics T6313164.java * @compile/fail/ref=T6313164Source8AndHigher.out -XDrawDiagnostics T6313164.java
*/ */
import p1.*; import p1.*;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,8 @@
* @bug 8049075 * @bug 8049075
* @summary javac, wildcards and generic vararg method invocation not accepted * @summary javac, wildcards and generic vararg method invocation not accepted
* @compile VarargsAndWildcardParameterizedTypeTest.java * @compile VarargsAndWildcardParameterizedTypeTest.java
* @compile -source 8 VarargsAndWildcardParameterizedTypeTest.java * @compile --release 8 VarargsAndWildcardParameterizedTypeTest.java
* @compile -source 7 VarargsAndWildcardParameterizedTypeTest.java * @compile --release 7 VarargsAndWildcardParameterizedTypeTest.java
*/ */
class VarargsAndWildcardParameterizedTypeTest { class VarargsAndWildcardParameterizedTypeTest {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,8 @@
* @bug 8075520 * @bug 8075520
* @summary Varargs access check mishandles capture variables * @summary Varargs access check mishandles capture variables
* @compile VarargsAndWildcardParameterizedTypeTest2.java * @compile VarargsAndWildcardParameterizedTypeTest2.java
* @compile -source 8 VarargsAndWildcardParameterizedTypeTest2.java * @compile --release 8 VarargsAndWildcardParameterizedTypeTest2.java
* @compile -source 7 VarargsAndWildcardParameterizedTypeTest2.java * @compile --release 7 VarargsAndWildcardParameterizedTypeTest2.java
*/ */
class VarargsAndWildcardParameterizedTypeTest2 { class VarargsAndWildcardParameterizedTypeTest2 {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,8 @@
* @bug 8075520 * @bug 8075520
* @summary Varargs access check mishandles capture variables * @summary Varargs access check mishandles capture variables
* @compile VarargsAndWildcardParameterizedTypeTest3.java * @compile VarargsAndWildcardParameterizedTypeTest3.java
* @compile -source 8 VarargsAndWildcardParameterizedTypeTest3.java * @compile --release 8 VarargsAndWildcardParameterizedTypeTest3.java
* @compile -source 7 VarargsAndWildcardParameterizedTypeTest3.java * @compile --release 7 VarargsAndWildcardParameterizedTypeTest3.java
*/ */
class VarargsAndWildcardParameterizedTypeTest2 { class VarargsAndWildcardParameterizedTypeTest2 {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,8 @@
* @bug 8075520 * @bug 8075520
* @summary Varargs access check mishandles capture variables * @summary Varargs access check mishandles capture variables
* @compile VarargsAndWildcardParameterizedTypeTest4.java * @compile VarargsAndWildcardParameterizedTypeTest4.java
* @compile -source 8 VarargsAndWildcardParameterizedTypeTest4.java * @compile --release 8 VarargsAndWildcardParameterizedTypeTest4.java
* @compile -source 7 VarargsAndWildcardParameterizedTypeTest4.java * @compile --release 7 VarargsAndWildcardParameterizedTypeTest4.java
*/ */
class VarargsAndWildcardParameterizedTypeTest2 { class VarargsAndWildcardParameterizedTypeTest2 {

View file

@ -3,8 +3,8 @@
* @bug 8077786 * @bug 8077786
* @summary Check varargs access against inferred signature * @summary Check varargs access against inferred signature
* @compile/fail/ref=VarargsInferredPrivateType.out -nowarn -XDrawDiagnostics VarargsInferredPrivateType.java OtherPackage.java * @compile/fail/ref=VarargsInferredPrivateType.out -nowarn -XDrawDiagnostics VarargsInferredPrivateType.java OtherPackage.java
* @compile/fail/ref=VarargsInferredPrivateType.out -source 8 -nowarn -XDrawDiagnostics VarargsInferredPrivateType.java OtherPackage.java * @compile/fail/ref=VarargsInferredPrivateType.out --release 8 -nowarn -XDrawDiagnostics VarargsInferredPrivateType.java OtherPackage.java
* @compile/fail/ref=VarargsInferredPrivateType-source7.out -source 7 -nowarn -XDrawDiagnostics VarargsInferredPrivateType.java OtherPackage.java * @compile/fail/ref=VarargsInferredPrivateType-source7.out --release 7 -nowarn -XDrawDiagnostics VarargsInferredPrivateType.java OtherPackage.java
*/ */
class VarargsInferredPrivateType { class VarargsInferredPrivateType {

View file

@ -3,9 +3,9 @@
* @bug 8020586 * @bug 8020586
* @summary Warnings in the imports section should be attributed to the correct source file * @summary Warnings in the imports section should be attributed to the correct source file
* @clean Auxiliary ImplicitCompilation * @clean Auxiliary ImplicitCompilation
* @compile/ref=ImplicitCompilation.out -source 8 -XDrawDiagnostics -Xlint:deprecation,-options -sourcepath . ImplicitCompilation.java * @compile/ref=ImplicitCompilation.out --release 8 -XDrawDiagnostics -Xlint:deprecation,-options -sourcepath . ImplicitCompilation.java
* @clean Auxiliary ImplicitCompilation * @clean Auxiliary ImplicitCompilation
* @compile/ref=ExplicitCompilation.out -source 8 -XDrawDiagnostics -Xlint:deprecation,-options ImplicitCompilation.java Auxiliary.java * @compile/ref=ExplicitCompilation.out --release 8 -XDrawDiagnostics -Xlint:deprecation,-options ImplicitCompilation.java Auxiliary.java
*/ */
public class ImplicitCompilation { public class ImplicitCompilation {

View file

@ -3,8 +3,8 @@
* @bug 4986256 6598104 8032211 8194764 * @bug 4986256 6598104 8032211 8194764
* @compile/ref=Deprecation.noLint.out -XDrawDiagnostics Deprecation.java * @compile/ref=Deprecation.noLint.out -XDrawDiagnostics Deprecation.java
* @compile/ref=Deprecation.lintDeprecation.out -Xlint:deprecation -XDrawDiagnostics Deprecation.java * @compile/ref=Deprecation.lintDeprecation.out -Xlint:deprecation -XDrawDiagnostics Deprecation.java
* @compile/ref=Deprecation.lintDeprecation.out -Xlint:deprecation,-options -source 9 -XDrawDiagnostics Deprecation.java * @compile/ref=Deprecation.lintDeprecation.out -Xlint:deprecation,-options --release 9 -XDrawDiagnostics Deprecation.java
* @compile/ref=Deprecation.lintDeprecation8.out -Xlint:deprecation,-options -source 8 -XDrawDiagnostics Deprecation.java * @compile/ref=Deprecation.lintDeprecation8.out -Xlint:deprecation,-options --release 8 -XDrawDiagnostics Deprecation.java
*/ */
import java.io.StringBufferInputStream; import java.io.StringBufferInputStream;

View file

@ -3,7 +3,7 @@
* @bug 8065219 * @bug 8065219
* @summary Deprecated warning in method reference are missing in some cases. * @summary Deprecated warning in method reference are missing in some cases.
* @compile/ref=DeprecationSE8Test.noLint.out -XDrawDiagnostics DeprecationSE8Test.java * @compile/ref=DeprecationSE8Test.noLint.out -XDrawDiagnostics DeprecationSE8Test.java
* @compile/ref=DeprecationSE8Test.out -Xlint:deprecation,-options -source 8 -XDrawDiagnostics DeprecationSE8Test.java * @compile/ref=DeprecationSE8Test.out -Xlint:deprecation,-options --release 8 -XDrawDiagnostics DeprecationSE8Test.java
*/ */

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,5 +27,5 @@
* @summary Verify that deprecated warning is printed correctly for import * @summary Verify that deprecated warning is printed correctly for import
* statement when processing a file on demand while attributing another file. * statement when processing a file on demand while attributing another file.
* @clean pack.ImplicitUse pack.ImplicitMain pack.Dep * @clean pack.ImplicitUse pack.ImplicitMain pack.Dep
* @compile/ref=ImplicitTest.out -source 8 -XDrawDiagnostics -Xlint:deprecation,-options pack/ImplicitMain.java * @compile/ref=ImplicitTest.out --release 8 -XDrawDiagnostics -Xlint:deprecation,-options pack/ImplicitMain.java
*/ */

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,5 +26,5 @@
* @bug 8021112 * @bug 8021112
* @summary Verify that deprecated warnings are printed correctly for package-info.java * @summary Verify that deprecated warnings are printed correctly for package-info.java
* @clean pack.* * @clean pack.*
* @compile/ref=PackageInfo.out -source 8 -XDrawDiagnostics -Xlint:deprecation,-options pack/package-info.java pack/DeprecatedClass.java * @compile/ref=PackageInfo.out --release 8 -XDrawDiagnostics -Xlint:deprecation,-options pack/package-info.java pack/DeprecatedClass.java
*/ */