TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  Controversial11Checked automatically with code checker

This rule is Obsolete
Synopsis:If a field is only used by one method, consider making it a local variable
Language:Java
Severity Level:4
Category:Controversial


Description:
A field that's only used by one method could perhaps be replaced by a local variable.
public class Foo {
    private int x;
    public void foo(int y) {
     x = y + 5;
     return x;
    }
}