[jdom-interest] Element.setAttribute(s)() B7 multiple bugs?
Alex Rosen
arosen at silverstream.com
Wed Aug 1 08:01:20 PDT 2001
> Here's the pertinent code:
>
> public Element setAttributes(List attributes) {
> // XXX Verify attributes are all parentless first
> this.attributes = attributes;
> return this;
> }
Hmmm... On an unrelated topic: Doesn't this need some work? First of all, it
doesn't setParent() on the passed-in Attributes. Second, the List that you
pass in is now live - changes you make to the List will affect the
attributes of this element now. Which is different from setContent(List).
And, for our other live lists (the ones we return), don't we check to make
sure that subsequently added objects are of the correct type?
Alex
More information about the jdom-interest
mailing list