Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 94A59200B97 for ; Sun, 9 Oct 2016 11:29:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9338C160AF5; Sun, 9 Oct 2016 09:29:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CFE42160AC3 for ; Sun, 9 Oct 2016 11:29:21 +0200 (CEST) Received: (qmail 19432 invoked by uid 500); 9 Oct 2016 09:29:20 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 19399 invoked by uid 99); 9 Oct 2016 09:29:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Oct 2016 09:29:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8E3422C0D52 for ; Sun, 9 Oct 2016 09:29:20 +0000 (UTC) Date: Sun, 9 Oct 2016 09:29:20 +0000 (UTC) From: "Huafeng Wang (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-13641) Update UGI#spawnAutoRenewalThreadForUserCreds to reduce indentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 09 Oct 2016 09:29:22 -0000 [ https://issues.apache.org/jira/browse/HADOOP-13641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15559667#comment-15559667 ] Huafeng Wang commented on HADOOP-13641: --------------------------------------- Hi [~drankye], Thanks for your review and I uploaded a new patch which fixed the check style and the issue you mentioned. Please help to review it. > 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 > Assignee: Huafeng Wang > Priority: Minor > Labels: newbie > Attachments: HADOOP-13641.1.patch, HADOOP-13641.2.patch > > > 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-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org