[jdom-interest] JDOM 1.0b6 bug in Element.hasChildren()?

Jason Hunter jhunter at collab.net
Thu Mar 22 12:41:01 PST 2001


Ken Rune Helland wrote:
> 
> Why isnt this just using the instanceof operator?
> 
> like:
> 
>            while (i.hasNext()){
>              if (i.next() instanceof Element) {
>                return true;
>              }
>            }
> 
> This will return true for Element and all subclasses of element.
> If the second operator to instanceof is a interface it will
> return true for all objects that implements this interface.
> 
> Best regards
> KenR

Just integrated this fix.  Thanks, guys.

-jh-



More information about the jdom-interest mailing list