hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Homan (JIRA)" <j...@apache.org>
Subject [jira] Created: (HADOOP-6682) NetUtils:normalizeHostName does not process hostnames starting with [a-f] correctly
Date Mon, 05 Apr 2010 23:54:27 GMT
NetUtils:normalizeHostName does not process hostnames starting with [a-f] correctly
-----------------------------------------------------------------------------------

                 Key: HADOOP-6682
                 URL: https://issues.apache.org/jira/browse/HADOOP-6682
             Project: Hadoop Common
          Issue Type: Bug
          Components: io
            Reporter: Jakob Homan


  public static String normalizeHostName(String name) {
    if (Character.digit(name.charAt(0), 16) != -1) {
      return name;

This code is attempting to short-circuit the hostname->ip resolution on the assumption
that if name starts with a digit, it's already an ip address.  This is of questionable value,
but because it checks for a hex digit, it will fail on names starting with [a-f].  Such names
will not be converted to an ip address, but be returned unchanged.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message