JAVA.HIDDEN.MEMBER.LOCAL

The name of a local variable and a member variable are duplicated.

Vulnerability and risk

Unintended misuse of variables can cause problems.

Mitigation and prevention

Avoid duplication by using different variable names to avoid misuse.

Example 1

Copy
class C06MLC
{
    private int privateVarHidden;
    public void hidePrivate()
    {
        int privateVarHidden = 0; //NG
    }

}