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 Parser gives parser error for syntax java.lang.@NonNull String test #3683

Closed
BoykoAlex opened this issue Nov 13, 2023 · 4 comments · Fixed by #3818
Closed

Java Parser gives parser error for syntax java.lang.@NonNull String test #3683

BoykoAlex opened this issue Nov 13, 2023 · 4 comments · Fixed by #3818
Assignees
Labels
bug Something isn't working parser-java test provided Already replicated with a unit test, using JUnit pioneer's ExpectedToFail

Comments

@BoykoAlex
Copy link
Contributor

Coming from spring-projects/sts4#1142 (comment)

Looks like this is a valid syntax.

I've created a unit test for this syntax:

              public class A {
                java.lang.@Deprecated String a;
              }
@timtebeek
Copy link
Contributor

Oh wow, didn't know that was an option; although after seeing all the ways you can declare and annotate arrays I'm not surprised. As soon as we add support I want a recipe that moves away from that style. ;) Thanks for bringing it to our attention!

@timtebeek timtebeek moved this to Backlog in OpenRewrite Nov 22, 2023
@timtebeek timtebeek added the test provided Already replicated with a unit test, using JUnit pioneer's ExpectedToFail label Nov 22, 2023
@traceyyoshima
Copy link
Contributor

Note: I think annotations in FQNs may be supported now that we have an annotations field in J.Identifier.

@timtebeek
Copy link
Contributor

@traceyyoshima traceyyoshima self-assigned this Dec 13, 2023
@traceyyoshima traceyyoshima moved this from Backlog to In Progress in OpenRewrite Dec 13, 2023
@traceyyoshima traceyyoshima moved this from In Progress to Ready to Review in OpenRewrite Dec 14, 2023
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Dec 14, 2023
@timtebeek
Copy link
Contributor

Thanks for the report @BoykoAlex ! Should be fixed in the latests snapshots, with a release to follow soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser-java test provided Already replicated with a unit test, using JUnit pioneer's ExpectedToFail
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants