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

Jason Hunter jhunter at xquery.com
Tue Feb 10 11:49:01 PST 2004


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 
> 
> 



More information about the jdom-interest mailing list