DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38316>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38316





------- Additional Comments From [EMAIL PROTECTED]  2006-01-23 06:27 -------
Hi Nathan,

With your patch there still appear to be conditions where an 
ArrayIndexOutOfBoundsException could be thrown. Consider the case where the 
object has been cleared (which sets the length to zero). The call to 
System.arraycopy() assumes that the length of the new array is longer than the 
old one, but if length < declared.length that isn't true so you would get an 
exception.

Aside from the exceptions thrown, the current code also has a performance 
issue. With the new size of the array always set to the length of the attribute 
list, there will be a new array allocated and an array copy just about every 
time an attributed is added. AttributesImpl doubles the size of its String 
array when it runs out of space in the current one. The same should probably be 
done with the boolean arrays in Attributes2Impl.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Reply via email to