aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xml/XmlReader.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-27 19:06:08 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-27 19:06:08 +0200
commit0e93e5ce52e7ca9a00b5c6f8fe6931ce3eb6f05c (patch)
tree1dbd7e1c0c78b469261255605c339ab843285d53 /src/eu/siacs/conversations/xml/XmlReader.java
parentf8fedeb697de89d233bd9d2ab5babe07d112b396 (diff)
trying to work around npe in androids xml parser
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/xml/XmlReader.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/xml/XmlReader.java b/src/eu/siacs/conversations/xml/XmlReader.java
index 10b2fb06..0a74dbfb 100644
--- a/src/eu/siacs/conversations/xml/XmlReader.java
+++ b/src/eu/siacs/conversations/xml/XmlReader.java
@@ -54,7 +54,7 @@ public class XmlReader {
try { wakeLock.release();} catch (RuntimeException re) {}
}
try {
- while(parser.next() != XmlPullParser.END_DOCUMENT) {
+ while(parser.next() != XmlPullParser.END_DOCUMENT && this.is != null) {
wakeLock.acquire();
if (parser.getEventType() == XmlPullParser.START_TAG) {
Tag tag = Tag.start(parser.getName());
@@ -81,8 +81,6 @@ public class XmlReader {
throw new IOException("xml parser mishandled ArrayIndexOufOfBounds", e);
} catch (StringIndexOutOfBoundsException e) {
throw new IOException("xml parser mishandled StringIndexOufOfBounds", e);
- } catch (NullPointerException e) {
- throw new IOException("null pointer in xml parser");
}
return null;
}