attilapiros commented on code in PR #39728: URL: https://github.com/apache/spark/pull/39728#discussion_r1087250704
########## core/src/main/scala/org/apache/spark/util/Utils.scala: ########## @@ -1118,7 +1118,7 @@ private[spark] object Utils extends Logging { // This means some invalid addresses are treated as v6 addresses, but since they are // not valid hostnames it doesn't matter. // See https://www.rfc-editor.org/rfc/rfc1123#page-13 for context around valid hostnames. - val addressRe = """^\[{0,1}([0-9:]+?:[0-9]+)\]{0,1}$""".r + val addressRe = """^\[{0,1}([0-9:]+?:[0-9]*)\]{0,1}$""".r Review Comment: Is there any reason why not use just this tiny regexp: ``` """^\[{0,1}([0-9:]+)\]{0,1}$""" ``` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org