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

Jason Hunter jhunter at xquery.com
Tue Feb 10 09:30:42 PST 2004


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
> 



More information about the jdom-interest mailing list