mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-29 00:14:12 +01:00
In case of invalid XML in the payloads, at least still load the message
This commit is contained in:
parent
9b2d51b527
commit
5f15e851fa
1 changed files with 6 additions and 2 deletions
|
@ -309,8 +309,12 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
|
|||
final XmlReader xmlReader = new XmlReader();
|
||||
xmlReader.setInputStream(ByteSource.wrap(payloadsStr.getBytes()).openStream());
|
||||
Tag tag;
|
||||
while ((tag = xmlReader.readTag()) != null) {
|
||||
payloads.add(xmlReader.readElement(tag));
|
||||
try {
|
||||
while ((tag = xmlReader.readTag()) != null) {
|
||||
payloads.add(xmlReader.readElement(tag));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e(Config.LOGTAG, "Failed to parse: " + payloadsStr, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue