clebertsuconic commented on a change in pull request #2912: NO-JIRA Minor code 
improvement in QueueImpl
URL: https://github.com/apache/activemq-artemis/pull/2912#discussion_r356152933
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ##########
 @@ -1604,9 +1602,11 @@ public long getDurableScheduledSize() {
 
       for (String lingerSessionId : lingerSessionIds) {
          ServerSession serverSession = server.getSessionByID(lingerSessionId);
-         List<MessageReference> refs = serverSession == null ? null : 
serverSession.getInTxLingerMessages();
-         if (refs != null && !refs.isEmpty()) {
-            mapReturn.put(serverSession.toManagementString(), refs);
+         if (serverSession != null) {
+            List<MessageReference> refs = 
serverSession.getInTxLingerMessages();
 
 Review comment:
   your code change may get more complex here than the intended cleanup. I 
would leave this one, unless you have a creative choise.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to