smengcl commented on code in PR #8920:
URL: https://github.com/apache/hadoop/pull/8920#discussion_r4475559996
##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java:
##########
@@ -1877,7 +1878,10 @@ protected String resolveHost(String src) {
Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
protected boolean isIP(String src) {
- return ipPattern.matcher(src).matches();
+ // InetAddresses alone also covers IPv4, but it rejects leading zero
octets such as
+ // "010.1.1.1", which the regex accepts and resolveHost() resolves. Keep
the regex so
Review Comment:
Thanks, dropped the regex. `isIP` now calls
`InetAddresses.isInetAddress(src)` directly (f9cda252745).
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]