You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zhouxinyu (via GitHub)" <gi...@apache.org> on 2023/03/20 06:50:15 UTC

[GitHub] [rocketmq] zhouxinyu commented on a diff in pull request #6375: [ISSUE #6373] Optimized log printing and fixed null pointer exceptions

zhouxinyu commented on code in PR #6375:
URL: https://github.com/apache/rocketmq/pull/6375#discussion_r1141687164


##########
proxy/src/main/java/org/apache/rocketmq/proxy/service/mqclient/MQClientAPIFactory.java:
##########
@@ -55,6 +55,9 @@ protected void init() {
         System.setProperty(ClientConfig.SEND_MESSAGE_WITH_VIP_CHANNEL_PROPERTY, "false");
         ProxyConfig proxyConfig = ConfigurationManager.getProxyConfig();
         if (StringUtils.isEmpty(proxyConfig.getNamesrvDomain())) {
+            if (proxyConfig.getNamesrvAddr() == null || proxyConfig.getNamesrvAddr().isEmpty()) {

Review Comment:
   Try [isNullOrEmpty](https://guava.dev/releases/23.0/api/docs/com/google/common/base/Strings.html#isNullOrEmpty-java.lang.String-) to simplify this line.



-- 
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: commits-unsubscribe@rocketmq.apache.org

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