HADOOP-6912. Guard against NPE when calling UGI.isLoginKeytabBased(). Contributed by Kan Zhang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1079068 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jitendra Nath Pandey 2011-03-08 01:19:09 +00:00
parent 69fe37a007
commit aac5472491
2 changed files with 5 additions and 2 deletions

View File

@ -100,6 +100,9 @@ Trunk (unreleased changes)
HADOOP-7131. Exceptions thrown by Text methods should include the causing HADOOP-7131. Exceptions thrown by Text methods should include the causing
exception. (Uma Maheswara Rao G via todd) exception. (Uma Maheswara Rao G via todd)
HADOOP-6912. Guard against NPE when calling UGI.isLoginKeytabBased().
(Kan Zhang via jitendra)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -811,8 +811,8 @@ public class UserGroupInformation {
* Did the login happen via keytab * Did the login happen via keytab
* @return true or false * @return true or false
*/ */
public synchronized static boolean isLoginKeytabBased() { public synchronized static boolean isLoginKeytabBased() throws IOException {
return loginUser.isKeytab; return getLoginUser().isKeytab;
} }
/** /**