YxAc commented on code in PR #89:
URL: https://github.com/apache/rocketmq-mqtt/pull/89#discussion_r862318014
##########
mqtt-common/src/main/java/org/apache/rocketmq/mqtt/common/util/TopicUtils.java:
##########
@@ -93,10 +93,10 @@ public static boolean isP2pTopic(String topic) {
}
public static String getP2Peer(MqttTopic mqttTopic, String namespace) {
- if (!isP2P(mqttTopic.getSecondTopic())) {
+ if (mqttTopic.getSecondTopic() == null || mqttTopic.getFirstTopic() ==
null) {
return null;
}
- if (mqttTopic.getSecondTopic() == null || mqttTopic.getFirstTopic() ==
null) {
+ if (!isP2P(mqttTopic.getSecondTopic())) {
Review Comment:
reserve the order of 'null judgment' and 'p2p judgment'
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]