Skip to content

Commit 4080ce6

Browse files
authored
Remove lambda function to fix animal sniffer error (#1388)
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
1 parent 86cec29 commit 4080ce6

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transaction/ZigBeeTransactionManager.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* constraints in the queues.
6767
* <p>
6868
* When sending, queues are polled in order. Order is kept by a queue of queues. This outer queue can have multiple
69-
* entries of the same transaction queue. Every time the transaction manager is called to send a transaction, the
69+
* entries of the same transaction queue. Every time the transaction manager is called to send a transaction, the
7070
* transaction will be a added to a respective transaction queue which will be added to the outer queue.
7171
* Every time a transaction queue is polled from the outer queue only one single transaction is attempted to be sent.
7272
* If no transaction is retrieved from the transaction queue (e.g. due to inter-transaction delays) the transaction is
@@ -399,17 +399,17 @@ private ZigBeeTransactionQueue getTransactionQueue(ZigBeeTransaction transaction
399399
return defaultQueue;
400400
}
401401
// Add the transaction to the device queue - if it doesn't currently exist, create it
402-
return nodeQueue.compute(node.getIeeeAddress(), (nodeAddress, queue) -> {
403-
if (queue == null && createIfNotExist) {
404-
logger.debug("{}: Creating new Transaction Queue", node.getIeeeAddress());
405-
ZigBeeTransactionQueue createdQueue = new ZigBeeTransactionQueue(node.getIeeeAddress().toString(),
406-
node.getIeeeAddress());
407-
setQueueType(node, createdQueue);
408-
409-
return createdQueue;
410-
}
411-
return queue;
412-
});
402+
ZigBeeTransactionQueue queue = nodeQueue.get(node.getIeeeAddress());
403+
if (queue == null && createIfNotExist) {
404+
logger.debug("{}: Creating new Transaction Queue", node.getIeeeAddress());
405+
ZigBeeTransactionQueue createdQueue = new ZigBeeTransactionQueue(node.getIeeeAddress().toString(),
406+
node.getIeeeAddress());
407+
setQueueType(node, createdQueue);
408+
nodeQueue.put(node.getIeeeAddress(), createdQueue);
409+
410+
return createdQueue;
411+
}
412+
return queue;
413413
} else if (address instanceof ZigBeeEndpointAddress
414414
&& ZigBeeBroadcastDestination.isBroadcast(address.getAddress())) {
415415
return broadcastQueue;

0 commit comments

Comments
 (0)