Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[java] Parse error on rare extra dimensions on method return type on annotation methods #3642

Closed
oowekyala opened this issue Nov 20, 2021 · 2 comments
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

Comments

@oowekyala
Copy link
Member

Affects PMD Version: 6.40.0

Make sure, to test with the latest PMD version.

Description: title. Found in checkstyle sources in #3640

Code Sample demonstrating the issue:

@interface Foo {
    String v1()[]; // parse error
    // equivalent to String[] v1();
}
@oowekyala oowekyala added 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 needs-backport labels Nov 20, 2021
@adangel
Copy link
Member

adangel commented Nov 23, 2021

Interesting: the eclipse compiler also shows an parse error... but it seems to be valid java code...

@jsotuyod
Copy link
Member

This is fixed in PMD 7.0.0-rc1. It won't be backported to PMD 6.

@oowekyala oowekyala added this to the 7.0.0 milestone Apr 24, 2023
adangel added a commit that referenced this issue Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants