[jdom-interest] Child-Parent patch - Ideas.

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Feb 6 11:36:55 PST 2004


At 1:48 PM -0500 2/6/04, Rolf Lear wrote:
>Hi again.
>
>I have found another small potential oops in ContentList.java introduced
>with my patch.
>I have made ContentList a "final" class. Although I can not see why it would
>be subclassed, there is also no reason to make it final.

Design for subclassing or prohibit it. If you don't know why it would 
be  or how it should be subclassed, mark it final. It can always be 
marked non-final later without breaking anything. The reverse is not 
true.
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



More information about the jdom-interest mailing list