Symptoms
CausesSomeone decides, "We'll use null to mean the default." This may let them avoid the trouble of initializing certain fields or of creating certain objects, or it may be an afterthought for an unexpected case. The null check may be introduced to work around a null-pointer bug (without addressing the underlying cause). What to Do
PayoffReduces duplication. Reduces logic errors and exceptions. Contraindications
|