accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2854) Bad null check in BulkImport.createNewBulkDir()
Date Wed, 18 Jun 2014 21:34:25 GMT

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

ASF subversion and git services commented on ACCUMULO-2854:
-----------------------------------------------------------

Commit 079ef51c7c254f1f7bd7bd4d83ea405ae635b433 in accumulo's branch refs/heads/master from
[~jschwartz73]
[ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=079ef51 ]

ACCUMULO-2854 Added additional check to prevent NPE

Signed-off-by: Bill Havanki <bhavanki@cloudera.com>


> Bad null check in BulkImport.createNewBulkDir()
> -----------------------------------------------
>
>                 Key: ACCUMULO-2854
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2854
>             Project: Accumulo
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 1.6.0
>            Reporter: Bill Havanki
>            Assignee: Jeffrey S Schwartz
>              Labels: newbie, summit2014
>             Fix For: 1.6.1, 1.7.0
>
>         Attachments: ACCUMULO-2854.patch.txt
>
>
> At the beginning of {{createNewBulkDir}} in {{o.a.a.master.tableOps.BulkImport}}:
> {code}
>     String tableDir = fs.matchingFileSystem(new Path(sourceDir), ServerConstants.getTablesDirs()).toString();
>     
>     if (tableDir == null)
>       throw new IllegalStateException(sourceDir + " is not in a known namespace");
> {code}
> The call to {{matchingFileSystem()}} can return null, and if it does, a NullPointerException
will be thrown. {{toString()}} on a non-null result will not return null, so the null check
has no effect.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message