From 687d4dbd1d26c3f6cfd24ee37e872a1fef9552d1 Mon Sep 17 00:00:00 2001 From: Jakob Homan Date: Sat, 12 Jun 2010 02:12:16 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/net/NetUtils.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 65c4823c347..24da48af1d8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -87,6 +87,9 @@ Trunk (unreleased changes) HADOOP-6613. Moves the RPC version check ahead of the AuthMethod check. (Kan Zhang via ddas) + HADOOP-6682. NetUtils:normalizeHostName does not process hostnames starting + with [a-f] correctly. (jghoman) + Release 0.21.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/src/java/org/apache/hadoop/net/NetUtils.java b/src/java/org/apache/hadoop/net/NetUtils.java index e8590618726..bc81d5b79a8 100644 --- a/src/java/org/apache/hadoop/net/NetUtils.java +++ b/src/java/org/apache/hadoop/net/NetUtils.java @@ -398,7 +398,7 @@ public class NetUtils { * @return its IP address in the string format */ 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; } else { try {