Browse Source

commit c4bb0e8abcabcecac077ae403d0ffe4b671fd574
Author: Douglass Cutting <cutting@apache.org>
Date: Fri Oct 29 22:55:53 2010 +0000

HADOOP-7011. Fix KerberosName.main() to not throw an NPE. Contributed by Aaron T. Myers.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1028938 13f79535-47bb-0310-9956-ffa450edef68


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/yahoo-merge@1079115 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 năm trước cách đây
mục cha
commit
9644295e19

+ 3 - 0
CHANGES.txt

@@ -294,6 +294,9 @@ Trunk (unreleased changes)
     HADOOP-6991.  Fix SequenceFile::Reader to honor file lengths and call
     HADOOP-6991.  Fix SequenceFile::Reader to honor file lengths and call
     openFile (cdouglas via omalley)
     openFile (cdouglas via omalley)
 
 
+    HADOOP-7011.  Fix KerberosName.main() to not throw an NPE.
+    (Aaron T. Myers via tomwhite)
+
 Release 0.21.1 - Unreleased
 Release 0.21.1 - Unreleased
 
 
   IMPROVEMENTS
   IMPROVEMENTS

+ 2 - 1
src/java/org/apache/hadoop/security/KerberosName.java

@@ -399,9 +399,10 @@ public class KerberosName {
   }
   }
 
 
   public static void main(String[] args) throws Exception {
   public static void main(String[] args) throws Exception {
+    setConfiguration(new Configuration());
     for(String arg: args) {
     for(String arg: args) {
       KerberosName name = new KerberosName(arg);
       KerberosName name = new KerberosName(arg);
       System.out.println("Name: " + name + " to " + name.getShortName());
       System.out.println("Name: " + name + " to " + name.getShortName());
     }
     }
   }
   }
-}
+}