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,12 +288,15 @@ public class XPPPacketReader { ...@@ -288,12 +288,15 @@ 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 {
if (text.trim().length() > 0) {
throw new DocumentException("Cannot have text content outside of the root document"); throw new DocumentException("Cannot have text content outside of the root document");
} }
}
break; break;
} }
...@@ -349,8 +352,10 @@ public class XPPPacketReader { ...@@ -349,8 +352,10 @@ public class XPPPacketReader {
parent.addText(text); parent.addText(text);
} }
else { else {
if (text.trim().length() > 0) {
throw new DocumentException("Cannot have text content outside of the root document"); throw new DocumentException("Cannot have text content outside of the root document");
} }
}
break; break;
} }
default: default:
......
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