Tuesday, July 14, 2009

Pick out the null and throw in an Empty

The Dangling Composite pattern

I have learnt not to assign a null to a reference in a list object's constructor, because when the equals() method is applied, I will get a NullPointerException. It says creating an Empty class will fix that - I guess it's because it's still a class (although it does look weird in the UML diagram...)

No comments:

Post a Comment