You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Matteo Bertozzi (JIRA)" <ji...@apache.org> on 2014/04/12 03:21:15 UTC

[jira] [Commented] (HBASE-10968) Null check in TableSnapshotInputFormat#TableSnapshotRegionRecordReader#initialize() is redundant

    [ https://issues.apache.org/jira/browse/HBASE-10968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13967330#comment-13967330 ] 

Matteo Bertozzi commented on HBASE-10968:
-----------------------------------------

I've the fix in HBASE-7987 patch,
but +1 to have the one line fix in now.

> 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
>
> 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)