Index

Examples: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

compiler.err.cant.apply.diamond.1 DiamondAndAnonClass.java
compiler.err.feature.not.supported.in.source DiamondNotSupported.java, MulticatchNotSupported.java, TryResourceNotSupported.java
compiler.err.feature.not.supported.in.source.plural AnnotationsAfterTypeParamsNotSupportedInSource.java, DefaultMethodNotSupported.java, IntersectionTypesInCastNotSupported.java, LambdaNotSupported.java, MethodReferencesNotSupported.java, PrivateInterfaceMethodsNotSupported.java, RepeatableAnnotationsNotSupported.java, StaticIntfMethodInvokeNotSupported.java, StaticIntfMethodNotSupported.java, StringSwitchNotSupported.java, TypeAnnotationsNotSupported.java, UnsupportedBinaryLiteral.java, UnsupportedUnderscoreLiteral.java, VarInTryWithResourcesNotSupportedInSource.java, module-info.java
compiler.misc.feature.annotations.after.type.params AnnotationsAfterTypeParamsNotSupportedInSource.java
compiler.misc.feature.binary.lit UnsupportedBinaryLiteral.java
compiler.misc.feature.default.methods DefaultMethodNotSupported.java
compiler.misc.feature.diamond DiamondNotSupported.java
compiler.misc.feature.diamond.and.anon.class DiamondAndAnonClass.java
compiler.misc.feature.intersection.types.in.cast IntersectionTypesInCastNotSupported.java
compiler.misc.feature.lambda LambdaNotSupported.java
compiler.misc.feature.method.references MethodReferencesNotSupported.java
compiler.misc.feature.modules module-info.java
compiler.misc.feature.multicatch MulticatchNotSupported.java
compiler.misc.feature.not.supported.in.source DiamondAndAnonClass.java
compiler.misc.feature.private.intf.methods PrivateInterfaceMethodsNotSupported.java
compiler.misc.feature.repeatable.annotations RepeatableAnnotationsNotSupported.java
compiler.misc.feature.static.intf.method.invoke StaticIntfMethodInvokeNotSupported.java
compiler.misc.feature.static.intf.methods StaticIntfMethodNotSupported.java
compiler.misc.feature.string.switch StringSwitchNotSupported.java
compiler.misc.feature.try.with.resources TryResourceNotSupported.java
compiler.misc.feature.type.annotations TypeAnnotationsNotSupported.java
compiler.misc.feature.underscore.lit UnsupportedUnderscoreLiteral.java
compiler.misc.feature.var.in.try.with.resources VarInTryWithResourcesNotSupportedInSource.java
compiler.warn.source.no.bootclasspath AnnotationsAfterTypeParamsNotSupportedInSource.java, DiamondAndAnonClass.java, PrivateInterfaceMethodsNotSupported.java, RepeatableAnnotationsNotSupported.java, TypeAnnotationsNotSupported.java, VarInTryWithResourcesNotSupportedInSource.java, module-info.java

AnnotationsAfterTypeParamsNotSupportedInSource.java

warning: [options] bootstrap class path not set in conjunction with -source 7 tests/AnnotationsAfterTypeParamsNotSupportedInSource.java:32: error: annotations after method type parameters are not supported in -source 7 <T> @Anno int m() { ^ (use -source 8 or higher to enable annotations after method type parameters) 1 error 1 warning

DefaultMethodNotSupported.java

tests/DefaultMethodNotSupported.java:29: error: default methods are not supported in -source 7 default void m() { } ^ (use -source 8 or higher to enable default methods) 1 error

DiamondAndAnonClass.java

warning: [options] bootstrap class path not set in conjunction with -source 8 tests/DiamondAndAnonClass.java:34: error: cannot infer type arguments for ArrayList<E> List<String> list = new ArrayList<>() {}; ^ reason: '<>' with anonymous inner classes is not supported in -source 8 (use -source 9 or higher to enable '<>' with anonymous inner classes) where E is a type-variable: E extends Object declared in class ArrayList 1 error 1 warning

DiamondNotSupported.java

tests/DiamondNotSupported.java:32: error: diamond operator is not supported in -source 6 List<String> list = new ArrayList<>(); ^ (use -source 7 or higher to enable diamond operator) 1 error

IntersectionTypesInCastNotSupported.java

tests/IntersectionTypesInCastNotSupported.java:29: error: intersection types are not supported in -source 7 Object o = (A & B)null; ^ (use -source 8 or higher to enable intersection types) 1 error

LambdaNotSupported.java

tests/LambdaNotSupported.java:29: error: lambda expressions are not supported in -source 7 S s = ()->{}; ^ (use -source 8 or higher to enable lambda expressions) 1 error

MethodReferencesNotSupported.java

tests/MethodReferencesNotSupported.java:29: error: method references are not supported in -source 7 S s = A::foo; ^ (use -source 8 or higher to enable method references) 1 error

MulticatchNotSupported.java

tests/MulticatchNotSupported.java:39: error: multi-catch statement is not supported in -source 6 } catch (final E1 | E2 e) { ^ (use -source 7 or higher to enable multi-catch statement) 1 error

PrivateInterfaceMethodsNotSupported.java

warning: [options] bootstrap class path not set in conjunction with -source 8 tests/PrivateInterfaceMethodsNotSupported.java:30: error: private interface methods are not supported in -source 8 private void foo() {} ^ (use -source 9 or higher to enable private interface methods) 1 error 1 warning

RepeatableAnnotationsNotSupported.java

warning: [options] bootstrap class path not set in conjunction with -source 7 tests/RepeatableAnnotationsNotSupported.java:32: error: repeated annotations are not supported in -source 7 @Anno ^ (use -source 8 or higher to enable repeated annotations) 1 error 1 warning

StaticIntfMethodInvokeNotSupported.java

tests/StaticIntfMethodInvokeNotSupported.java:31: error: static interface method invocations are not supported in -source 7 Stream.empty(); ^ (use -source 8 or higher to enable static interface method invocations) 1 error

StaticIntfMethodNotSupported.java

tests/StaticIntfMethodNotSupported.java:29: error: static interface methods are not supported in -source 7 static void m() { } ^ (use -source 8 or higher to enable static interface methods) 1 error

StringSwitchNotSupported.java

tests/StringSwitchNotSupported.java:30: error: strings in switch are not supported in -source 6 switch (s) { ^ (use -source 7 or higher to enable strings in switch) 1 error

TryResourceNotSupported.java

tests/TryResourceNotSupported.java:32: error: try-with-resources is not supported in -source 6 try (Writer out = new StringWriter()) { ^ (use -source 7 or higher to enable try-with-resources) 1 error

TypeAnnotationsNotSupported.java

warning: [options] bootstrap class path not set in conjunction with -source 7 tests/TypeAnnotationsNotSupported.java:33: error: type annotations are not supported in -source 7 int i = (@Anno int) 3.14; ^ (use -source 8 or higher to enable type annotations) 1 error 1 warning

UnsupportedBinaryLiteral.java

tests/UnsupportedBinaryLiteral.java:29: error: binary literals are not supported in -source 6 int i = 0b01000010; ^ (use -source 7 or higher to enable binary literals) 1 error

UnsupportedUnderscoreLiteral.java

tests/UnsupportedUnderscoreLiteral.java:29: error: underscores in literals are not supported in -source 6 int i = 123_456_789; ^ (use -source 7 or higher to enable underscores in literals) 1 error

VarInTryWithResourcesNotSupportedInSource.java

warning: [options] bootstrap class path not set in conjunction with -source 8 tests/VarInTryWithResourcesNotSupportedInSource.java:33: error: variables in try-with-resources are not supported in -source 8 try (ac) { ^ (use -source 9 or higher to enable variables in try-with-resources) 1 error 1 warning

module-info.java

warning: [options] bootstrap class path not set in conjunction with -source 8 tests/module-info.java:29: error: modules are not supported in -source 8 module ModulesNotSupportedInSource { ^ (use -source 9 or higher to enable modules) 1 error 1 warning