src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
changeset 48054 702043a4cdeb
parent 47934 6373d9a0ad82
child 48352 9b700a5c4381
child 48427 b08405cc467a
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Dec 04 10:13:58 2017 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Dec 04 17:54:49 2017 +0000
@@ -2601,38 +2601,87 @@
     ({3})
 
 ########################################
-# Diagnostics for language feature changes
+# Diagnostics for language feature changes.
+# Such diagnostics have a common template which can be customized by using a feature
+# diagnostic fragment (one of those given below).
 ########################################
 
-# 0: string
-compiler.err.modules.not.supported.in.source=\
-   modules are not supported in -source {0}\n\
-    (use -source 9 or higher to enable modules)
-
-# 0: string
-compiler.misc.diamond.and.anon.class.not.supported.in.source=\
-    cannot use ''<>'' with anonymous inner classes in -source {0}\n\
-    (use -source 9 or higher to enable ''<>'' with anonymous inner classes)
-
-# 0: string
-compiler.err.unsupported.binary.lit=\
-    binary literals are not supported in -source {0}\n\
-    (use -source 7 or higher to enable binary literals)
-
-# 0: string
-compiler.err.unsupported.underscore.lit=\
-    underscores in literals are not supported in -source {0}\n\
-    (use -source 7 or higher to enable underscores in literals)
-
-# 0: string
-compiler.err.try.with.resources.not.supported.in.source=\
-    try-with-resources is not supported in -source {0}\n\
-    (use -source 7 or higher to enable try-with-resources)
-
-# 0: string
-compiler.err.var.in.try.with.resources.not.supported.in.source=\
-    variables in try-with-resources not supported in -source {0}\n\
-    (use -source 9 or higher to enable variables in try-with-resources)
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.err.feature.not.supported.in.source=\
+   {0} is not supported in -source {1}\n\
+    (use -source {2} or higher to enable {0})
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.err.feature.not.supported.in.source.plural=\
+   {0} are not supported in -source {1}\n\
+    (use -source {2} or higher to enable {0})
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.misc.feature.not.supported.in.source=\
+   {0} is not supported in -source {1}\n\
+    (use -source {2} or higher to enable {0})
+
+# 0: message segment (feature), 1: string (found version), 2: string (expected version)
+compiler.misc.feature.not.supported.in.source.plural=\
+   {0} are not supported in -source {1}\n\
+    (use -source {2} or higher to enable {0})
+
+compiler.misc.feature.modules=\
+    modules
+
+compiler.misc.feature.diamond.and.anon.class=\
+    ''<>'' with anonymous inner classes
+
+compiler.misc.feature.binary.lit=\
+    binary literals
+
+compiler.misc.feature.underscore.lit=\
+    underscores in literals
+
+compiler.misc.feature.try.with.resources=\
+    try-with-resources
+
+compiler.misc.feature.var.in.try.with.resources=\
+    variables in try-with-resources
+
+compiler.misc.feature.type.annotations=\
+    type annotations
+
+compiler.misc.feature.annotations.after.type.params=\
+    annotations after method type parameters
+
+compiler.misc.feature.repeatable.annotations=\
+    repeated annotations
+
+compiler.misc.feature.diamond=\
+    diamond operator
+
+compiler.misc.feature.multicatch=\
+    multi-catch statements
+
+compiler.misc.feature.string.switch=\
+    strings in switch
+
+compiler.misc.feature.lambda=\
+    lambda expressions
+
+compiler.misc.feature.method.references=\
+    method references
+
+compiler.misc.feature.default.methods=\
+    default methods
+
+compiler.misc.feature.intersection.types.in.cast=\
+    intersection types
+
+compiler.misc.feature.static.intf.methods=\
+    static interface methods
+
+compiler.misc.feature.static.intf.method.invoke=\
+    static interface method invocations
+
+compiler.misc.feature.private.intf.methods=\
+    private interface methods
 
 compiler.warn.underscore.as.identifier=\
     as of release 9, ''_'' is a keyword, and may not be used as an identifier
@@ -2694,71 +2743,6 @@
 compiler.err.no.annotations.on.dot.class=\
     no annotations are allowed in the type of a class literal
 
-# 0: string
-compiler.err.type.annotations.not.supported.in.source=\
-    type annotations are not supported in -source {0}\n\
-(use -source 8 or higher to enable type annotations)
-
-# 0: string
-compiler.err.annotations.after.type.params.not.supported.in.source=\
-    annotations after method type parameters are not supported in -source {0}\n\
-(use -source 8 or higher to enable annotations after method type parameters)
-
-# 0: string
-compiler.err.repeatable.annotations.not.supported.in.source=\
-    repeated annotations are not supported in -source {0}\n\
-(use -source 8 or higher to enable repeated annotations)
-
-# 0: string
-compiler.err.diamond.not.supported.in.source=\
-    diamond operator is not supported in -source {0}\n\
-    (use -source 7 or higher to enable diamond operator)
-
-# 0: string
-compiler.err.multicatch.not.supported.in.source=\
-    multi-catch statement is not supported in -source {0}\n\
-    (use -source 7 or higher to enable multi-catch statement)
-
-# 0: string
-compiler.err.string.switch.not.supported.in.source=\
-    strings in switch are not supported in -source {0}\n\
-    (use -source 7 or higher to enable strings in switch)
-
-# 0: string
-compiler.err.lambda.not.supported.in.source=\
-    lambda expressions are not supported in -source {0}\n\
-    (use -source 8 or higher to enable lambda expressions)
-
-# 0: string
-compiler.err.method.references.not.supported.in.source=\
-    method references are not supported in -source {0}\n\
-    (use -source 8 or higher to enable method references)
-
-# 0: string
-compiler.err.default.methods.not.supported.in.source=\
-    default methods are not supported in -source {0}\n\
-    (use -source 8 or higher to enable default methods)
-
-# 0: string
-compiler.err.intersection.types.in.cast.not.supported.in.source=\
-    intersection types in cast are not supported in -source {0}\n\
-    (use -source 8 or higher to enable intersection types in cast)
-
-# 0: string
-compiler.err.static.intf.methods.not.supported.in.source=\
-    static interface methods are not supported in -source {0}\n\
-    (use -source 8 or higher to enable static interface methods)
-
-# 0: string
-compiler.err.static.intf.method.invoke.not.supported.in.source=\
-    static interface method invocations are not supported in -source {0}\n\
-    (use -source 8 or higher to enable static interface method invocations)
-
-# 0: string
-compiler.err.private.intf.methods.not.supported.in.source=\
-    private interface methods are not supported in -source {0}\n\
-    (use -source 9 or higher to enable private interface methods)
-
 ########################################
 # Diagnostics for verbose resolution
 # used by Resolve (debug only)