mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 07:22:07 +01:00
Use CopyOnWriteArraySet in DeliveryReceiptManager
This commit is contained in:
parent
8bf74c6e92
commit
19ee9f016b
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue