wjwang00 commented on code in PR #7282: URL: https://github.com/apache/incubator-seata/pull/7282#discussion_r2040659631
########## 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: Sure, I have adjusted the `NetUtil.splitIPPortStr` method to ensure that the returned result is definitely a string array of length 2 with the correct format. The caller no longer needs to validate the returned result. -- 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