HADOOP-6682. NetUtils:normalizeHostName does not process hostnames starting with [a-f] correctly.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@953929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jakob Homan 2010-06-12 02:12:16 +00:00
parent 8fa094ad6a
commit 687d4dbd1d
2 changed files with 4 additions and 1 deletions

View File

@ -87,6 +87,9 @@ Trunk (unreleased changes)
HADOOP-6613. Moves the RPC version check ahead of the AuthMethod check. HADOOP-6613. Moves the RPC version check ahead of the AuthMethod check.
(Kan Zhang via ddas) (Kan Zhang via ddas)
HADOOP-6682. NetUtils:normalizeHostName does not process hostnames starting
with [a-f] correctly. (jghoman)
Release 0.21.0 - Unreleased Release 0.21.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -398,7 +398,7 @@ public class NetUtils {
* @return its IP address in the string format * @return its IP address in the string format
*/ */
public static String normalizeHostName(String name) { public static String normalizeHostName(String name) {
if (Character.digit(name.charAt(0), 16) != -1) { // it is an IP if (Character.digit(name.charAt(0), 10) != -1) { // it is an IP
return name; return name;
} else { } else {
try { try {