langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
changeset 27844 8b5d79870a2f
parent 27387 54142fc27e8a
child 27991 8f4b68523da3
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Nov 17 23:11:05 2014 -0800
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Nov 19 13:46:04 2014 +0100
@@ -252,6 +252,14 @@
 compiler.err.cant.ref.non.effectively.final.var=\
     local variables referenced from {1} must be final or effectively final
 
+compiler.err.try.with.resources.expr.needs.var=\
+    the try-with-resources resource must either be a variable declaration or an expression denoting \
+a reference to a final or effectively final variable
+
+# 0: symbol
+compiler.err.try.with.resources.expr.effectively.final.var=\
+    variable {0} used as a try-with-resources resource neither final nor effectively final
+
 
 compiler.misc.lambda=\
     a lambda expression
@@ -2262,6 +2270,11 @@
     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)
+
 compiler.warn.underscore.as.identifier=\
     ''_'' used as an identifier\n\
     (use of ''_'' as an identifier might not be supported in releases after Java SE 8)