hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077493 - /hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/SecurityUtil.java
Date Fri, 04 Mar 2011 04:20:33 GMT
Author: omalley
Date: Fri Mar  4 04:20:33 2011
New Revision: 1077493

URL: http://svn.apache.org/viewvc?rev=1077493&view=rev
Log:
commit 59f7803ddc0214f2f0cd316d291957cba777e125
Author: Devaraj Das <ddas@yahoo-inc.com>
Date:   Fri Jun 4 13:01:09 2010 -0700

    HDFS:1007 from https://issues.apache.org/jira/secure/attachment/12446362/hdfs-1007-securityutil-fix.patch
    
    +++ b/YAHOO-CHANGES.txt
    +    HDFS-1007. Fixes a bug in SecurityUtil.buildDTServiceName to do
    +    with handling of null hostname. (omalley)
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/SecurityUtil.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/SecurityUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/SecurityUtil.java?rev=1077493&r1=1077492&r2=1077493&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/SecurityUtil.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/SecurityUtil.java
Fri Mar  4 04:20:33 2011
@@ -212,7 +212,13 @@ public class SecurityUtil {
     // for whatever reason using NetUtils.createSocketAddr(target).toString()
     // returns "localhost/ip:port"
     StringBuffer sb = new StringBuffer();
-    sb.append(NetUtils.normalizeHostName(uri.getHost())).append(":").append(port);
+    String host = uri.getHost();
+    if (host != null) {
+      host = NetUtils.normalizeHostName(host);
+    } else {
+      host = "";
+    }
+    sb.append(host).append(":").append(port);
     return sb.toString();
   }
   



Mime
View raw message