Bugs item #1312695, was opened at 2005-10-04 10:47
Message generated for change (Comment added) made by cschmid
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.


----------------------------------------------------------------------

Comment By: Claus Schmid (cschmid)
Date: 2006-02-22 19:30

Message:
Logged In: YES 
user_id=170683

The same can happen at line

XMLWriter.java:1129

Regards,
Claus Schmid


----------------------------------------------------------------------

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: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to