You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Xiao Chen (JIRA)" <ji...@apache.org> on 2016/09/22 17:57:20 UTC

[jira] [Created] (HADOOP-13641) Update UGI#spawnAutoRenewalThreadForUserCreds to reduce indentation

Xiao Chen created HADOOP-13641:
----------------------------------

             Summary: Update UGI#spawnAutoRenewalThreadForUserCreds to reduce indentation
                 Key: HADOOP-13641
                 URL: https://issues.apache.org/jira/browse/HADOOP-13641
             Project: Hadoop Common
          Issue Type: Improvement
            Reporter: Xiao Chen
            Priority: Minor


From [~drankye]'s comment in HADOOP-13590:

Could we return earlier at the beginning so we can avoid at least 2 level of indents and make the whole block more readable?
{code}
  /**Spawn a thread to do periodic renewals of kerberos credentials*/
  private void spawnAutoRenewalThreadForUserCreds() {
    if (isSecurityEnabled()) {
      //spawn thread only if we have kerb credentials
      if (user.getAuthenticationMethod() == AuthenticationMethod.KERBEROS &&
          !isKeytab) {
...
...
                             very deep nested ...
...
{code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org