diff options
author | desperateCoder <echotodevnull@gmail.com> | 2020-09-17 12:56:02 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2020-09-17 12:56:02 +0300 |
commit | 83b3683eacfd5340f113fb7c773594067576c493 (patch) | |
tree | a63d3961ad72c5a1d3ebce23ef2e19a9f75baeea /app/src/main | |
parent | cb4edf347aa3e8f57960f203e3df0ca2baa739d9 (diff) |
make attachment parsing more robust
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java b/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java index 8b2686499..ebd66a8fa 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java @@ -456,7 +456,7 @@ public class JsonToEntityParser { a.setCreatedAt(getTimestampFromLong(e.get("createdAt"))); a.setCreatedBy(e.get("createdBy").getAsString()); a.setDeletedAt(getTimestampFromLong(e.get("deletedAt"))); - if (e.has("extendedData") && !e.get("extendedData").isJsonNull()) { + if (e.has("extendedData") && !e.get("extendedData").isJsonNull() && e.get("extendedData").isJsonObject()) { JsonObject extendedData = e.getAsJsonObject("extendedData").getAsJsonObject(); a.setFilesize(extendedData.get("filesize").getAsLong()); a.setMimetype(extendedData.get("mimetype").getAsString()); |