[jdom-interest] Element.setAttribute(s)() B7 multiple bugs?

Jason Hunter jhunter at acm.org
Tue Jul 31 16:02:44 PDT 2001

Matthew Stone wrote:
> Of course the most logical solution for me was what I tried first...
> foo.setAttributes(foo2.getAttributes());
> Was I wrong to expect it to create/overwrite the attributes on foo2?  Per
> the doc's, B7 was supposed to provide support for this right?

Here's the pertinent code:

    public Element setAttributes(List attributes) {
        // XXX Verify attributes are all parentless first
        this.attributes = attributes;
        return this;

So it clearly replaces the attributes.  I wonder if your "foo2" actually
has two instances of the same attribute, since we aren't doing perfect
checking on that.


More information about the jdom-interest mailing list