Hmm... I don't know if this is the right list to take this up on but...
The static method TagSupport.findAncestorWithClass(Tag,Class) probably
implemented by Sun is.... BUGGY!
Doing some decompiling you come up with the following:

    public static Tag findAncestorWithClass(Tag tag, Class class1)
    {
        Tag tag1;
        while((tag1 = tag.getParent()) != null)
            if(tag1.getClass() == class1)
                return tag1;

        return null;
    }

Sun (or whoever implemented this) has succesfully gotten two bugs into these
4 lines of code. First, if the tag has a parent and it is not of the right
class this will loop. Second, the contract of the return-value is: (and I
quote) "the nearest ancestor that implements the interface or is an instance
of the class specified". The implementation is "is an instance of _exactly_
the class specified".

Have you implemented this one or have you simply included the implementation
from Sun. In that case it simply _has_ to be a bugfix somewhere.

Jon Tirsén
Chief Architect
Itec Open Business Integrator AB
PGP key lookup:
http://certserver.pgp.com:11371/pks/lookup?op=get&search=0xE9032B9A
BEGIN:VCARD
VERSION:2.1
N:Tirsén;Jon;;;
FN:Jon Tirsén
ORG:Itec;
TITLE:Chief Architect
TEL;WORK;VOICE:+46 (8) 343431
TEL;CELL;VOICE:+46 (709) 306109
TEL;WORK;FAX:+46 (8) 343438
ADR;WORK:;;Box 23049;Stockholm;;104 35;Sweden
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Box 23049=0D=0AStockholm 104 35=0D=0ASweden
ADR;POSTAL:;;Ynglingagatan 17;Stockholm;;104 35;Sweden
LABEL;POSTAL;ENCODING=QUOTED-PRINTABLE:Ynglingagatan 17=0D=0AStockholm,  104 35=0D=0ASweden
URL:
URL:http://www.itec.se
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
EMAIL;INTERNET:[EMAIL PROTECTED]
REV:19990417T134712Z
END:VCARD

Reply via email to