We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the code below, the static attribute i is readable and written to multiple times, so the attribute cannot be final.
i
FIELD_SHOULD_BE_FINAL
class A { private static int i; //# ok final int id; A() { i++; this.id = i; } }
The text was updated successfully, but these errors were encountered:
modernize field should be final check and fix Feuermagier#401
d1e2dd3
Successfully merging a pull request may close this issue.
Summary
Given the code below, the static attribute
i
is readable and written to multiple times, so the attribute cannot be final.Lint Name
FIELD_SHOULD_BE_FINAL
Reproducer
The text was updated successfully, but these errors were encountered: