diff options
author | Andrew Dolgov <[email protected]> | 2015-07-12 22:54:30 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-07-12 22:54:30 +0300 |
commit | 2bee76f0c9c1b41d939abb8f7b448c490ae15de0 (patch) | |
tree | 058b7d4ddc1505075936d5fef927ec17305fe9f4 | |
parent | 0be76abf8763cba30ef5cc80a566b6579c569337 (diff) |
handle possible type problems w/ m_firstId in JSON
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java index 8e1bb716..505fbd3e 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeadlinesRequest.java @@ -62,7 +62,11 @@ public class HeadlinesRequest extends ApiRequest { //Log.d(TAG, "headerID:" + header.get("top_id_changed")); m_firstIdChanged = header.get("first_id_changed") != null; - m_firstId = header.get("first_id").getAsInt(); + try { + m_firstId = header.get("first_id").getAsInt(); + } catch (NumberFormatException e) { + m_firstId = 0; + } Log.d(TAG, "firstID=" + m_firstId + " firstIdChanged=" + m_firstIdChanged); |