Skip to content

Commit

Permalink
Merge pull request #3634 from harshithasudhakar/patch-7
Browse files Browse the repository at this point in the history
[ISSUE #3395]Use isEmpty() to check whether the collection is empty or not.[ClientSessionGroupMapping]
  • Loading branch information
xwm1992 authored Apr 6, 2023
2 parents 4eb819f + baa01d4 commit f3eb86f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private void cleanSubscriptionInSession(Session session) throws Exception {
private void handleUnackMsgsInSession(Session session) {
ConcurrentHashMap<String /** seq */, DownStreamMsgContext> unAckMsg = session.getPusher().getUnAckMsg();
ClientGroupWrapper clientGroupWrapper = Objects.requireNonNull(session.getClientGroupWrapper().get());
if (unAckMsg.size() > 0 && clientGroupWrapper.getGroupConsumerSessions().size() > 0) {
if (unAckMsg.size() > 0 && !clientGroupWrapper.getGroupConsumerSessions().isEmpty()) {
for (Map.Entry<String, DownStreamMsgContext> entry : unAckMsg.entrySet()) {
DownStreamMsgContext downStreamMsgContext = entry.getValue();
if (SubscriptionMode.BROADCASTING == downStreamMsgContext.getSubscriptionItem().getMode()) {
Expand Down

0 comments on commit f3eb86f

Please sign in to comment.