[ 
https://issues.apache.org/jira/browse/ARTEMIS-4714?focusedWorklogId=913129&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-913129
 ]

ASF GitHub Bot logged work on ARTEMIS-4714:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Apr/24 04:04
            Start Date: 05/Apr/24 04:04
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on code in PR #4875:
URL: https://github.com/apache/activemq-artemis/pull/4875#discussion_r1552820139


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java:
##########
@@ -325,7 +325,9 @@ public void onMessage(ClientMessage clientMessage) {
       } catch (Exception e) {
          
ActiveMQServerLogger.LOGGER.federationDispatchError(clientMessage.toString(), 
e);
          try {
-            clientSession.rollback();
+            if (clientSession != null) {
+               clientSession.rollback();

Review Comment:
   I had considered that, but I thought the only way to address it was with 
synchronization. Your solution is a good one. I implemented it.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 913129)
    Time Spent: 40m  (was: 0.5h)

> Mitigate NPE in FederatedQueueConsumerImpl MessageListener
> ----------------------------------------------------------
>
>                 Key: ARTEMIS-4714
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4714
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to