[java] Unable to parse some Java9+ resource references #4912
Labels
a:bug
PMD crashes or fails to analyse a file.
in:grammar
About the grammar of a lexer or parser, eg, a parse/lex exception
Milestone
Affects PMD Version:
7.0.0
Description:
Since Java 9, PMD has allowed for concise resources (ie: not variables declared within the try-with-resources), but some constructs are currently rejected by the parser even if valid Java code.
Code Sample demonstrating the issue:
Probably others too…
Running PMD through: Any
Probably, the saner fix would be to simply remove this check altogether, and continue under the premise that the code compiles…
pmd/pmd-java/etc/grammar/Java.jjt
Lines 2868 to 2873 in a28943a
The text was updated successfully, but these errors were encountered: