[jdom-interest] patch for atttributes.clear() needed

eric.hein at sbcglobal.net eric.hein at sbcglobal.net
Tue Jul 15 20:31:37 PDT 2003


Can anyone provide the patch referenced below?
Thanks,
- Eric


"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++;
      }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030715/f3c7558b/attachment.htm


More information about the jdom-interest mailing list