From 49c06013903ff9ed97620a4be4bd006b1f62263b Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 13 Jul 2010 21:54:11 +0000 Subject: [PATCH] cketti points out that I was cloning improperly. (Also, reading the docs for add, I don't need to check existence first) --- src/com/fsck/k9/controller/MessagingController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 321e77742..209ed79d8 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -359,8 +359,8 @@ public class MessagingController implements Runnable public Set getListeners(MessagingListener listener) { - Set listeners = mListeners; - if (listener != null && getListeners().contains(listener) == false) + Set listeners = new CopyOnWriteArraySet(mListeners); + if (listener != null) { listeners.add(listener); }