[jdom-interest] (Small) Bug in AttributeList.clear()
Bradley S. Huffman
hip at csa.cs.okstate.edu
Fri Jun 13 06:51:01 PDT 2003
"Benjamin Broll" writes:
> Hi everyone,
>
> currently I'm heavily working with Attributes and discovered a little
> bug in the AttributeList.clear() implementation.
>
> The method just clears the content of the list but does not reset its
> size to 0. Thus, when adding two Attributes after the clear() call, a
> NullPointerException is thrown from the
Patch below.
Brad
*** AttributeList.old Fri Jun 13 08:48:33 2003
--- AttributeList.java Fri Jun 13 08:49:08 2003
***************
*** 256,261 ****
--- 256,262 ----
attribute.setParent(null);
}
elementData = null;
+ size = 0;
}
modCount++;
}
More information about the jdom-interest
mailing list