funky-eyes commented on code in PR #7112: URL: https://github.com/apache/incubator-seata/pull/7112#discussion_r1916119275
########## common/src/main/java/org/apache/seata/common/util/NetAddressValidatorUtil.java: ########## @@ -133,19 +129,17 @@ public static boolean isIPv6IPv4MappedAddress(final String input) { } /** - * Check if <code>input</code> is a link local IPv6 address starting with "fe80:" and containing + * Check if <code>input</code> is a link local IPv6 address containing * a zone index with "%xxx". The zone index will not be checked. * * @param input ip-address to check * @return true if address part of <code>input</code> is in correct IPv6 notation. */ public static boolean isLinkLocalIPv6WithZoneIndex(String input) { - if (input.length() > FIVE && input.substring(ZERO, FIVE).equalsIgnoreCase(FE80)) { - int lastIndex = input.lastIndexOf(PERCENT); - if (lastIndex > ZERO && lastIndex < (input.length() - 1)) { - String ipPart = input.substring(ZERO, lastIndex); - return isIPv6StdAddress(ipPart) || isIPv6HexCompressedAddress(ipPart); - } + int lastIndex = input.lastIndexOf(PERCENT); Review Comment: 请增加一个测试用例 Please add a test case -- 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