mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-19 10:32:05 +01:00
[sinttest] Do not create myReceiveMarkers on demand
This commit is contained in:
parent
11a486d84d
commit
9520aa7d90
1 changed files with 3 additions and 6 deletions
|
@ -134,6 +134,9 @@ public class XmppConnectionStressTest {
|
|||
Map<XMPPConnection, Map<EntityFullJid, boolean[]>> receiveMarkers = new ConcurrentHashMap<>(connections.size());
|
||||
|
||||
for (XMPPConnection connection : connections) {
|
||||
final Map<EntityFullJid, boolean[]> myReceiveMarkers = new HashMap<>(connections.size());
|
||||
receiveMarkers.put(connection, myReceiveMarkers);
|
||||
|
||||
connection.addSyncStanzaListener(new StanzaListener() {
|
||||
@Override
|
||||
public void processStanza(Stanza stanza) {
|
||||
|
@ -145,12 +148,6 @@ public class XmppConnectionStressTest {
|
|||
|
||||
Integer messageNumber = (Integer) extension.getProperty(MESSAGE_NUMBER_PROPERTY);
|
||||
|
||||
Map<EntityFullJid, boolean[]> myReceiveMarkers = receiveMarkers.get(connection);
|
||||
if (myReceiveMarkers == null) {
|
||||
myReceiveMarkers = new HashMap<>(connections.size());
|
||||
receiveMarkers.put(connection, myReceiveMarkers);
|
||||
}
|
||||
|
||||
boolean[] fromMarkers = myReceiveMarkers.get(from);
|
||||
if (fromMarkers == null) {
|
||||
fromMarkers = new boolean[configuration.messagesPerConnection];
|
||||
|
|
Loading…
Reference in a new issue