You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/06 16:05:00 UTC

[GitHub] [rocketmq-mqtt] YxAc commented on a diff in pull request #45: [ISSUE #22] make codeCov of mqtt.cs.channel more than 80%

YxAc commented on code in PR #45:
URL: https://github.com/apache/rocketmq-mqtt/pull/45#discussion_r844126721


##########
mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/channel/ChannelInfo.java:
##########
@@ -114,11 +110,7 @@ public static Boolean getCleanSessionFlag(Channel channel) {
         if (!getInfo(channel).containsKey(CHANNEL_CLEAN_SESSION_KEY)) {
             getInfo(channel).put(CHANNEL_CLEAN_SESSION_KEY, true);
         }
-        Object obj = getInfo(channel).get(CHANNEL_CLEAN_SESSION_KEY);
-        if (obj == null) {
-            return true;
-        }
-        return (Boolean)obj;
+        return (Boolean) getInfo(channel).get(CHANNEL_CLEAN_SESSION_KEY);

Review Comment:
   @tianliuliu yes, that's my mistake. See you've fixed it, thanks for your time and sorry for the trouble.



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org