Commit 212c208f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed disconnection problem.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@668 b35dd754-fafc-0310-a699-88a17e54d16e
parent 39a12e4b
...@@ -288,11 +288,14 @@ public class XPPPacketReader { ...@@ -288,11 +288,14 @@ public class XPPPacketReader {
} }
case XmlPullParser.CDSECT: case XmlPullParser.CDSECT:
{ {
String text = pp.getText();
if (parent != null) { if (parent != null) {
parent.addCDATA(pp.getText()); parent.addCDATA(text);
} }
else { else {
throw new DocumentException("Cannot have text content outside of the root document"); if (text.trim().length() > 0) {
throw new DocumentException("Cannot have text content outside of the root document");
}
} }
break; break;
...@@ -349,7 +352,9 @@ public class XPPPacketReader { ...@@ -349,7 +352,9 @@ public class XPPPacketReader {
parent.addText(text); parent.addText(text);
} }
else { else {
throw new DocumentException("Cannot have text content outside of the root document"); if (text.trim().length() > 0) {
throw new DocumentException("Cannot have text content outside of the root document");
}
} }
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment