org.sonar.l10n.java.rules.squid.HiddenFieldCheck.html Maven / Gradle / Ivy
Shadowing fields with a local variable is a bad practice that reduces code readability: It makes it confusing to know whether the field or the variable is being used.
Noncompliant Code Example
class Foo {
public int myField;
public void doSomething() {
int myField = 0;
...
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy