Bugs item #1312695, was opened at 2005-10-04 10:47
Message generated for change (Comment added) made by maartenc
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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Yaroslav Sokolov (yarick123)
>Assigned to: Maarten Coene (maartenc)
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: Maarten Coene (maartenc)
Date: 2006-03-22 22:21

Message:
Logged In: YES 
user_id=178745

Fixed in CVS.
Thanks!

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

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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to