From c00400ef77487661fc559ca758568405838b337b Mon Sep 17 00:00:00 2001 From: gonzalo Date: Wed, 18 Oct 2017 08:50:06 -0300 Subject: [PATCH] Fix try with final resource --- pmd-java/etc/grammar/Java.jjt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-java/etc/grammar/Java.jjt b/pmd-java/etc/grammar/Java.jjt index 5f15749f5e..28f615cf39 100644 --- a/pmd-java/etc/grammar/Java.jjt +++ b/pmd-java/etc/grammar/Java.jjt @@ -2253,7 +2253,7 @@ void Resources() : void Resource() : {} { - LOOKAHEAD(2) ( ( "final" | Annotation() )* Type() VariableDeclaratorId() "=" Expression() ) + LOOKAHEAD(2) ( ( "final" {jjtThis.setFinal(true);} | Annotation() )* Type() VariableDeclaratorId() "=" Expression() ) | Name() {checkForBadConciseTryWithResourcesUsage();} }