[jdom-interest] API inconsistency

Szegedi, Attila szegedi at scriptum.hu
Fri Jun 22 05:24:09 PDT 2001


>
> I see Attribute was missing a getDocument() but that's the
> only case.  I
> added the method.  Thinking about it more, I'm not sure it belongs.  I
> can't imagine why anyone would call attr.getDocument().  Let me know
> what people think.
>
> -jh-

I didn't miss that method that much. You could always get the document with:

Document doc = null;
Element e = attr.getParent();
if(e != null) doc = e.getDocument();

I hope that your addition of getDocument() to Attribute was implemented in
similar fashion, and that you didn't actually add a private Document field
to Attribute.
Attila.

> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
> uraddr at yourhost.com
>




More information about the jdom-interest mailing list