diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-11-21 20:53:59 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-11-21 20:53:59 +0100 |
commit | 244c29aa17cf52ae72e9c53106a0d333966433d2 (patch) | |
tree | ee1ca6d15d6796f3c984aa8e8a8780ed23420d6a /src/main/java/de/pixart/messenger | |
parent | 3258c830420f70a727193f7b36c5f952d1eee343 (diff) |
catch all sorts of date parsing errors
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/AbstractParser.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/PresenceParser.java | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/AbstractParser.java b/src/main/java/de/pixart/messenger/parser/AbstractParser.java index f85be0952..283aee7af 100644 --- a/src/main/java/de/pixart/messenger/parser/AbstractParser.java +++ b/src/main/java/de/pixart/messenger/parser/AbstractParser.java @@ -46,7 +46,7 @@ public abstract class AbstractParser { try { min = Math.min(min, AbstractParser.parseTimestamp(stamp)); returnDefault = false; - } catch (ParseException e) { + } catch (Throwable t) { //ignore } } diff --git a/src/main/java/de/pixart/messenger/parser/PresenceParser.java b/src/main/java/de/pixart/messenger/parser/PresenceParser.java index 0ade1abc3..e46947304 100644 --- a/src/main/java/de/pixart/messenger/parser/PresenceParser.java +++ b/src/main/java/de/pixart/messenger/parser/PresenceParser.java @@ -2,7 +2,6 @@ package de.pixart.messenger.parser; import android.util.Log; -import java.text.ParseException; import java.util.ArrayList; import java.util.List; @@ -224,7 +223,7 @@ public class PresenceParser extends AbstractParser implements final String since = idle.getAttribute("since"); contact.setLastseen(AbstractParser.parseTimestamp(since)); contact.flagInactive(); - } catch (NullPointerException | ParseException e) { + } catch (Throwable throwable) { if (contact.setLastseen(AbstractParser.parseTimestamp(packet))) { contact.flagActive(); } |