mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-16 12:12:06 +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;
|
package org.jivesoftware.smackx.receipts;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
|
|
||||||
import org.jivesoftware.smack.SmackException;
|
import org.jivesoftware.smack.SmackException;
|
||||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||||
|
@ -55,8 +54,7 @@ public class DeliveryReceiptManager extends Manager implements PacketListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean auto_receipts_enabled = false;
|
private boolean auto_receipts_enabled = false;
|
||||||
private Set<ReceiptReceivedListener> receiptReceivedListeners = Collections
|
private final Set<ReceiptReceivedListener> receiptReceivedListeners = new CopyOnWriteArraySet<ReceiptReceivedListener>();
|
||||||
.synchronizedSet(new HashSet<ReceiptReceivedListener>());
|
|
||||||
|
|
||||||
private DeliveryReceiptManager(XMPPConnection connection) {
|
private DeliveryReceiptManager(XMPPConnection connection) {
|
||||||
super(connection);
|
super(connection);
|
||||||
|
|
Loading…
Reference in a new issue