You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/11/28 14:27:00 UTC
DO NOT REPLY [Bug 5159] New: -
AttributesImpl.ensureCapacity() loops forever
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5159>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5159
AttributesImpl.ensureCapacity() loops forever
Summary: AttributesImpl.ensureCapacity() loops forever
Product: Xerces-J
Version: 1.4.4
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: SAX
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: meinedienste@gmx.de
AttributesImpl initialized with empty Attributes loops forever in
ensureCapacity when adding a new Attribute.
Test Program and patch are attached.
Cheers
Johannes Hofmann
import org.xml.sax.helpers.AttributesImpl;
public class test {
public static void main(String argv[]) {
AttributesImpl a, b;
a = new AttributesImpl();
b = new AttributesImpl(a);
b.addAttribute("", "foo", "foo", "", "bar");
}
}
4_4/src/org/xml/sax/helpers/AttributesImpl.java
--- xerces-1_4_4_orig/src/org/xml/sax/helpers/AttributesImpl.java Thu
Nov
15 20:26:47 2001
+++ xerces-1_4_4/src/org/xml/sax/helpers/AttributesImpl.java Wed Nov 28
14:10
:22 2001
@@ -567,6 +567,9 @@
return;
}
+ if ( max == 0 ) {
+ max = 25;
+ }
while (max < n * 5) {
max *= 2;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org