-
Notifications
You must be signed in to change notification settings - Fork 60
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
org.openrewrite.staticanalysis.RemoveUnusedPrivateFields does not recognize @Data Lombok annotation #242
Comments
Hi @gwydionmv ! Thanks for pointing that out and offering to help. I imagine the fix would be similar to what we do for explicit initialization: Lines 59 to 62 in a5dc2f7
Which we then test here rewrite-static-analysis/src/test/java/org/openrewrite/staticanalysis/ExplicitInitializationTest.java Lines 66 to 81 in 6a38549
|
We would likely need similar handling in rewrite-static-analysis/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateFields.java Lines 67 to 68 in e57dac0
And best to have a matching test as well in Lines 26 to 30 in 23ee04c
|
Would be much appreciated if you could provide a fix for that, which I'll gladly review shortly. We can then do the same for #8 too. |
I just created the PR @timtebeek 😄 #244 |
* #242 Compatibility with Lombok Data annotation * #242 Compatibility with Lombok Data annotation - formatting * Ignore Data, Value, Getter and Setter * Swap order of check vs variable initializations * Use AnnotationMatcher of `lombok.*` --------- Co-authored-by: Gwydion Martin <[email protected]> Co-authored-by: Tim te Beek <[email protected]>
Many thanks! Fixed in |
Hello!
Similar to this other open issue here, the recipe RemoveUnusedPrivateFields is deleting private fields even though the class is annotated as @DaTa.
I am using
I can help working on fixing this issue if you find it interesting too :D
The text was updated successfully, but these errors were encountered: