[ https://issues.apache.org/jira/browse/HBASE-10968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HBASE-10968: --------------------------- Attachment: 10968-v1.txt Thanks Matteo. Patch also removes an unused local variable. > 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 > 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)