diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-01-25 19:52:50 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-01-25 19:52:50 +0100 |
commit | 9271bc0f9ec17387e91f7d5e2980d073ac67cb82 (patch) | |
tree | 97aa762a1d169b183d9827a7e32fa3833c8a7f47 /src/main/java/de/pixart/messenger/xml | |
parent | 5263c457f8ecddb15285dc03e187b439c0ba4cfa (diff) |
make sure to properly stop tagwriter
Diffstat (limited to 'src/main/java/de/pixart/messenger/xml')
-rw-r--r-- | src/main/java/de/pixart/messenger/xml/TagWriter.java | 7 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/xml/XmlReader.java | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xml/TagWriter.java b/src/main/java/de/pixart/messenger/xml/TagWriter.java index 0a663ce1b..c96841d56 100644 --- a/src/main/java/de/pixart/messenger/xml/TagWriter.java +++ b/src/main/java/de/pixart/messenger/xml/TagWriter.java @@ -99,6 +99,13 @@ public class TagWriter { public void forceClose() { finish(); + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + //ignoring + } + } outputStream = null; } } diff --git a/src/main/java/de/pixart/messenger/xml/XmlReader.java b/src/main/java/de/pixart/messenger/xml/XmlReader.java index 3c8cfa1f2..efd4dcc95 100644 --- a/src/main/java/de/pixart/messenger/xml/XmlReader.java +++ b/src/main/java/de/pixart/messenger/xml/XmlReader.java @@ -82,7 +82,7 @@ public class XmlReader { } } catch (Throwable throwable) { - throw new IOException("xml parser mishandled " + throwable.getClass().getName(), throwable); + throw new IOException("xml parser mishandled " + throwable.getClass().getSimpleName() + "(" + throwable.getMessage() + ")", throwable); } finally { if (wakeLock.isHeld()) { try { |