Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 40BD8116C8 for ; Sat, 12 Apr 2014 01:43:20 +0000 (UTC) Received: (qmail 29667 invoked by uid 500); 12 Apr 2014 01:43:16 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 29509 invoked by uid 500); 12 Apr 2014 01:43:15 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 29490 invoked by uid 99); 12 Apr 2014 01:43:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2014 01:43:15 +0000 Date: Sat, 12 Apr 2014 01:43:15 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-10968) Null check in TableSnapshotInputFormat#TableSnapshotRegionRecordReader#initialize() is redundant MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-10968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-10968: --------------------------- Assignee: Ted Yu Status: Patch Available (was: Open) > Null check in TableSnapshotInputFormat#TableSnapshotRegionRecordReader#initialize() is redundant > ------------------------------------------------------------------------------------------------ > > Key: HBASE-10968 > URL: https://issues.apache.org/jira/browse/HBASE-10968 > Project: HBase > Issue Type: Bug > Reporter: Ted Yu > Assignee: Ted Yu > Priority: Minor > Attachments: 10968-v1.txt > > > Here is related code: > {code} > public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, > InterruptedException { > Configuration conf = context.getConfiguration(); > ... > if (context != null) { > this.context = context; > getCounter = TableRecordReaderImpl.retrieveGetCounterWithStringsParams(context); > } > {code} > context was dereferenced first, leaving the null check ineffective. -- This message was sent by Atlassian JIRA (v6.2#6252)