--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Fri Nov 12 12:33:52 2010 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Fri Nov 12 12:34:18 2010 +0000
@@ -1712,7 +1712,7 @@
S.nextToken();
List<JCTree> resources = List.<JCTree>nil();
if (S.token() == LPAREN) {
- checkAutomaticResourceManagement();
+ checkTryWithResources();
S.nextToken();
resources = resources();
accept(RPAREN);
@@ -2970,9 +2970,9 @@
allowMulticatch = true;
}
}
- void checkAutomaticResourceManagement() {
+ void checkTryWithResources() {
if (!allowTWR) {
- error(S.pos(), "automatic.resource.management.not.supported.in.source", source.name);
+ error(S.pos(), "try.with.resources.not.supported.in.source", source.name);
allowTWR = true;
}
}