From 3797b62420386abab35a82e96d8abc24279bc903 Mon Sep 17 00:00:00 2001 From: Sebastian Thomschke Date: Fri, 31 Jan 2020 09:22:47 +0100 Subject: [PATCH] NO-JIRA Remove unnecessary null-check in ExpiryScanner --- .../apache/activemq/artemis/core/server/impl/QueueImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index d03494a704..5aea38c991 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -2270,11 +2270,8 @@ public class QueueImpl extends CriticalComponentImpl implements Queue { } if (!expiredMessages.isEmpty()) { - Transaction tx = new TransactionImpl(storageManager); + final Transaction tx = new TransactionImpl(storageManager); for (MessageReference ref : expiredMessages) { - if (tx == null) { - tx = new TransactionImpl(storageManager); - } try { expire(tx, ref); refRemoved(ref);