slievrly commented on code in PR #7282: URL: https://github.com/apache/incubator-seata/pull/7282#discussion_r2040645694
########## discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/FileRegistryServiceImpl.java: ########## @@ -89,7 +89,7 @@ public List<InetSocketAddress> lookup(String key) throws Exception { List<InetSocketAddress> inetSocketAddresses = new ArrayList<>(); for (String endpoint : endpoints) { String[] ipAndPort = NetUtil.splitIPPortStr(endpoint); - if (ipAndPort.length != 2) { + if (ipAndPort == null || ipAndPort[0].isEmpty() || ipAndPort[1].isEmpty() ) { Review Comment: It is suggested that the judgments of ipAndPort[0] and ipAndPort[1] converge to the NetUtil.splitIPPortStr method. It is necessary to determine whether the outer caller ipAndPort is null and its length (there is a reference to the array below). -- 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: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org