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

Rule:  Design44Checked automatically with code checker

Synopsis:Never initialize a final field to null
Language:Java
Severity Level:1
Category:Design


Description:
Final fields can only be written to once. If a final field is initialized explicitly to null, it cannot be used anymore for a proper reason. This is probably a mistake.
class Foo {
  final Bar b = null;
}