zongtanghu commented on a change in pull request #1175: [ISSUE #1147]Add name server domain host support URL: https://github.com/apache/rocketmq/pull/1175#discussion_r277651824
########## File path: client/src/main/java/org/apache/rocketmq/client/ClientConfig.java ########## @@ -241,6 +247,15 @@ public void setLanguage(LanguageCode language) { } public String getNamespace() { + if (StringUtils.isNotEmpty(namespace)) { + return namespace; + } + + if (StringUtils.isNotEmpty(this.namesrvAddr)) { + if (NameServerAddressUtils.validateInstanceEndpoint(namesrvAddr)) { + return NameServerAddressUtils.parseInstanceIdFromEndpoint(namesrvAddr); + } + } return namespace; Review comment: Actually,I think the last code('return namespace') will return null!I think,so you can return null directly! ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services