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 } } |