1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Work around the fact that when we can't get read status for a message,

we'd end up with an NPE as we then queried the hashmap
This commit is contained in:
Jesse Vincent 2011-07-10 14:27:36 -04:00
parent 98ae8cf2be
commit b85c9b7b0e

View File

@ -2124,10 +2124,14 @@ public class WebDavStore extends Store {
for (String uid : mData.keySet()) {
HashMap<String, String> data = mData.get(uid);
String readStatus = data.get("read");
if (readStatus != null &&
!readStatus.equals("")) {
if (readStatus != null && !readStatus.equals("")) {
Boolean value = !readStatus.equals("0");
uidToRead.put(uid, value);
} else {
// We don't actually want to have null values in our hashmap,
// as it causes the calling code to crash with an NPE as it
// does a lookup in the maap.
uidToRead.put(uid, false);
}
}