Bugs item #1312695, was opened at 2005-10-04 10:47 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1312695&group_id=16035
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Yaroslav Sokolov (yarick123) Assigned to: Nobody/Anonymous (nobody) Summary: StringIndexOutOfBoundsException in XMLWriter if empty Text.. Initial Comment: Hello, Dom4j 1.6.1 throws the next exception if a document contained empty text node follewed by some element: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.charAt(String.java:444) at org.dom4j.io.XMLWriter.writeElementContent(XMLWriter.java:1074) at org.dom4j.io.XMLWriter.writeElement(XMLWriter.java:954) at org.dom4j.io.XMLWriter.writeNode(XMLWriter.java:1301) at org.dom4j.io.XMLWriter.write(XMLWriter.java:344) at WriterProblemWithEmptyTextNode.main(WriterProblemWithEmptyTextNode.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86) The test case is attached. Regards, Yaroslav Sokolov. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1312695&group_id=16035 ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev