You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Sergey Shelukhin (JIRA)" <ji...@apache.org> on 2015/11/12 23:31:10 UTC

[jira] [Created] (HADOOP-12567) NPE in SaslRpcServer

Sergey Shelukhin created HADOOP-12567:
-----------------------------------------

             Summary: NPE in SaslRpcServer
                 Key: HADOOP-12567
                 URL: https://issues.apache.org/jira/browse/HADOOP-12567
             Project: Hadoop Common
          Issue Type: Task
            Reporter: Sergey Shelukhin


{noformat}
if (LOG.isDebugEnabled()) {
            String username =
              getIdentifier(authzid, secretManager).getUser().getUserName();
            LOG.debug("SASL server DIGEST-MD5 callback: setting "
                + "canonicalized client ID: " + username);
          }
{noformat}

Looking at identifier implementations, e.g. AbstractDelegationTokenIdentifier (and others), I can see that getUser method can return null. If debug logging is enabled, this NPEs.
If getUser is not expected to return NULL, it should either be checked and erred upon better here, or the error should be allowed to happen where it would otherwise happen, not in some debug log statement.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)