1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Use CopyOnWriteArraySet in DeliveryReceiptManager

This commit is contained in:
Florian Schmaus 2014-10-05 16:27:52 +02:00
parent 8bf74c6e92
commit 19ee9f016b

View file

@ -16,11 +16,10 @@
*/
package org.jivesoftware.smackx.receipts;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.CopyOnWriteArraySet;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
@ -55,8 +54,7 @@ public class DeliveryReceiptManager extends Manager implements PacketListener {
}
private boolean auto_receipts_enabled = false;
private Set<ReceiptReceivedListener> receiptReceivedListeners = Collections
.synchronizedSet(new HashSet<ReceiptReceivedListener>());
private final Set<ReceiptReceivedListener> receiptReceivedListeners = new CopyOnWriteArraySet<ReceiptReceivedListener>();
private DeliveryReceiptManager(XMPPConnection connection) {
super(connection);