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

Rule:  Design25Checked automatically with code checker

Synopsis:Possible unsafe assignment to a non-final static field in a constructor
Language:Java
Severity Level:1
Category:Design


Description:
Identifies a possible unsafe usage of a static field.
public class StaticField {
   static int x;
   public StaticField(int y) {
    x = y; // unsafe
   }
}