diff --git a/src/com/fsck/k9/K9.java b/src/com/fsck/k9/K9.java index d45e8f72e..9eead455a 100644 --- a/src/com/fsck/k9/K9.java +++ b/src/com/fsck/k9/K9.java @@ -88,7 +88,7 @@ public class K9 extends Application { * * @see ApplicationAware */ - private static List observers = new ArrayList(); + private static final List observers = new ArrayList(); /** * This will be {@code true} once the initialization is complete and {@link #notifyObservers()} diff --git a/src/com/fsck/k9/cache/EmailProviderCache.java b/src/com/fsck/k9/cache/EmailProviderCache.java index ba3741f49..972d3abdb 100644 --- a/src/com/fsck/k9/cache/EmailProviderCache.java +++ b/src/com/fsck/k9/cache/EmailProviderCache.java @@ -42,9 +42,9 @@ public class EmailProviderCache { private String mAccountUuid; - private Map> mMessageCache = new HashMap>(); - private Map> mThreadCache = new HashMap>(); - private Map mHiddenMessageCache = new HashMap(); + private final Map> mMessageCache = new HashMap>(); + private final Map> mThreadCache = new HashMap>(); + private final Map mHiddenMessageCache = new HashMap(); private EmailProviderCache(String accountUuid) { diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 7b979371b..d71c06997 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -319,7 +319,7 @@ public class MessagingController implements Runnable { }; // Key is accountNumber - private ConcurrentHashMap notificationData = new ConcurrentHashMap(); + private final ConcurrentMap notificationData = new ConcurrentHashMap(); private static final Flag[] SYNC_FLAGS = new Flag[] { Flag.SEEN, Flag.FLAGGED, Flag.ANSWERED, Flag.FORWARDED }; diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index c830ce1e8..1874d91b6 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Date; +import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -439,7 +440,7 @@ public class ImapStore extends Store { private static final SimpleDateFormat RFC3501_DATE = new SimpleDateFormat("dd-MMM-yyyy", Locale.US); - private LinkedList mConnections = + private final Deque mConnections = new LinkedList(); /** @@ -453,7 +454,7 @@ public class ImapStore extends Store { * requests. This cache lets us make sure we always reuse, if possible, for a given * folder name. */ - private HashMap mFolderCache = new HashMap(); + private final Map mFolderCache = new HashMap(); public ImapStore(Account account) throws MessagingException { super(account); @@ -3463,7 +3464,7 @@ public class ImapStore extends Store { final PushReceiver mReceiver; private long lastRefresh = -1; - HashMap folderPushers = new HashMap(); + final Map folderPushers = new HashMap(); public ImapPusher(ImapStore store, PushReceiver receiver) { mStore = store;