-
Notifications
You must be signed in to change notification settings - Fork 334
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
Parser: not idempotent on annotated varargs #3881
Comments
Thanks for reporting this issue here @Bananeweizen ; always good to see your detailed reports. Just yesterday @traceyyoshima merged some changes related to arrays and annotations in #3860 ; Not sure if that also affects varargs, but it might be worth giving the snapshot versions a try. If not we can convert your sample into a unit test in rewrite-java-tck and verify that we're not making any unintended changes. |
I've reverted the PR and reopened this issue, as we will solve it in a slightly different way. I expect us to complete this next week. |
Issue still exists: |
Hey @Bananeweizen may I ask if you can still recall the context of receiving this error? I've managed to replicate your issue in the above PR and found a solution in the printer that is used to compare before and after states specifically in a test environment! |
I'm somewhat certain that I had around 20 such errors while running 1000+ recipes on a large product code base via maven plugin. |
What version of OpenRewrite are you using?
I am using
What is the smallest, simplest way to reproduce the problem?
What is the full stack trace of any errors you encountered?
The NonNull is from org.eclipse.jdt.annotations, but that should work for any type annotation which can be applied to arrays and types. When a normal array is used instead of the varargs, the parser doesn't produce an error.
Are you interested in contributing a fix to OpenRewrite?
probably not, I only feel confident in the recipes area, not the parser
The text was updated successfully, but these errors were encountered: