1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-02 00:25:10 -04:00

cketti points out that I was cloning improperly.

(Also, reading the docs for add, I don't need to check existence first)
This commit is contained in:
Jesse Vincent 2010-07-13 21:54:11 +00:00
parent 014b6c19c3
commit 49c0601390

View File

@ -359,8 +359,8 @@ public class MessagingController implements Runnable
public Set<MessagingListener> getListeners(MessagingListener listener)
{
Set<MessagingListener> listeners = mListeners;
if (listener != null && getListeners().contains(listener) == false)
Set<MessagingListener> listeners = new CopyOnWriteArraySet<MessagingListener>(mListeners);
if (listener != null)
{
listeners.add(listener);
}