This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 0fad7ece87 ARTEMIS-4714 mitigate NPE in FederatedQueueConsumerImpl 
MessageListener
0fad7ece87 is described below

commit 0fad7ece876a8afbf419b8fb4a7c6de8878d1141
Author: Justin Bertram <[email protected]>
AuthorDate: Thu Apr 4 14:51:10 2024 -0500

    ARTEMIS-4714 mitigate NPE in FederatedQueueConsumerImpl MessageListener
---
 .../artemis/core/server/federation/FederatedQueueConsumerImpl.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java
index e8cb99b413..2b854d9c5a 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java
@@ -325,7 +325,10 @@ public class FederatedQueueConsumerImpl implements 
FederatedQueueConsumer, Sessi
       } catch (Exception e) {
          
ActiveMQServerLogger.LOGGER.federationDispatchError(clientMessage.toString(), 
e);
          try {
-            clientSession.rollback();
+            ClientSession localSession = clientSession;
+            if (localSession != null) {
+               localSession.rollback();
+            }
          } catch (ActiveMQException e1) {
          }
       }

Reply via email to