[jdom-interest] [Fwd: JDOM trivia: Element.isAncestor method in Beta 9]

Phil Weighill-Smith phil.weighill-smith at volantis.com
Wed Feb 11 01:10:35 PST 2004


Jason, a confession: we're still using B9 so I can't verify in a runtime
sense!

However, I've looked at the updated code and can say that the method now
looks like it should do the right thing.

(Having said that, I'd have just updated the javadoc so as not to impact
existing client software that uses this method...)

Phil :n)

On Tue, 2004-02-10 at 19:49, Jason Hunter wrote:

> Fixed.  Phil, please verify.
> 
> Anyone relying on the backward behavior of isAncestor() should update 
> their code.
> 
> -jh-
> 
> Jason Hunter wrote:
> 
> > Looks like it's the same situation in b10.  I'll make sure it gets fixed.
> > 
> > -jh-
> > 
> > Phil Weighill-Smith wrote:
> > 
> >> I know Beta 10 is now available, but thought I'd raise this point 
> >> (raised to me) against Beta 9 just in case...
> >>
> >> The following javadoc for
> >>
> >> class org.jdom.Element
> >>
> >>     /**
> >>      * Determines if this element is the ancestor of another element.
> >>      *
> >>      * @param element <code>Element</code> to check against
> >>      * @return <code>true</code> if this element is the ancestor of the
> >>      *         supplied element
> >>      */
> >>     public boolean isAncestor(Element element) {
> >>
> >> is remarkable because the method does just the opposite :-)
> >>
> >> e.g.
> >>
> >> parent.isAncestor(child) is FALSE
> >> child.isAncestor(parent) is TRUE     
> >> -- 
> >> Phil Weighill-Smith <_phil.weighill-smith at volantis.com_ 
> >> <mailto:phil.weighill-smith at volantis.com>>
> >> Volantis Systems
> >>
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
> > 
> > 

-- 
Phil Weighill-Smith <phil.weighill-smith at volantis.com>
Volantis Systems
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20040211/fb9ba7cc/attachment.htm


More information about the jdom-interest mailing list