-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Prohibit static, non-final fields #7227
Comments
…ache#7301) A small step towards apache#7227.
@leventov so all public static (excluding public static final ) fields should be just public? |
Visibility modifier doesn't matter. static, non-final fields are a global mutable state, which is bad. Most often it's just an omission of the |
@leventov then what happens to non final static fields used in static blocks? |
What do you mean? Nothing relevant to this issue happens to such fields. |
@leventov isn't this about removing all "static fields that are not final" fields? and adding structural search rule. What happens to the below code in the case of Prohibit "static fields that are not final"?
|
There are three types of static, non-final fields in the project:
|
This can be done with IntelliJ structural search.
There are 332 occurrences.
The text was updated successfully, but these errors were encountered: