From b6315b15b04303cd9b12d7858111e45a4140f477 Mon Sep 17 00:00:00 2001 From: cketti Date: Sat, 3 Jan 2015 04:10:15 +0100 Subject: [PATCH] Fix equals() method to work with all objects --- k9mail/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k9mail/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java b/k9mail/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java index 67b3a87ad..6ee078111 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/FolderInfoHolder.java @@ -20,7 +20,7 @@ public class FolderInfoHolder implements Comparable { @Override public boolean equals(Object o) { - return this.name.equals(((FolderInfoHolder)o).name); + return o instanceof FolderInfoHolder && name.equals(((FolderInfoHolder) o).name); } @Override