-
Notifications
You must be signed in to change notification settings - Fork 298
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
getFieldAccesses() ignores accesses from lambdas #266
Comments
|
@abeyecon for this sort of rules a tool such as Error Prone may be more suitable. It has the MethodCanBeStatic check. |
Related to #215 |
I wonder how this is testable, the same goes for #215, as we do not support Java 8 inside ArchUnit. Should we just test a solution with an external project then? |
FYI: |
@KorSin if you wanna look into that ping me first, because I already did some investigation and started with some draft (which I'm not going on with for the next months, so I can always pass it on 😉) It's a somewhat challenging issue though 😉 Also needs an extension of the domain model I think. |
Should be fixed by #847 |
I'm trying to create methodsWithNoInstanceAccessShouldBeStatic rule to stop developers from checking in non-static methods that should be static. However it brings up false positives when a method contains a lambda. See minimal test case below which should be green but isn't. handleEndGame should not get flagged because it has a lambda which accesses a member variable (executor). I would have expected that input.getFieldAccesses() would have included the access of executor in handleEndGame().
The text was updated successfully, but these errors were encountered: