[
https://issues.apache.org/jira/browse/GORA-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15104001#comment-15104001
]
ASF GitHub Bot commented on GORA-461:
-------------------------------------
GitHub user renato2099 opened a pull request:
https://github.com/apache/gora/pull/54
GORA-461
Good catch from Ted Yu, quick fix.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/renato2099/gora GORA-461
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/gora/pull/54.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #54
----
commit 28c4ba4fd89f882baa1dfb4081a9625cd6fcf772
Author: Renato Marroquin <[email protected]>
Date: 2016-01-17T23:53:07Z
GORA-461
----
> Ineffective null check in HBaseStore#getPartitions
> --------------------------------------------------
>
> Key: GORA-461
> URL: https://issues.apache.org/jira/browse/GORA-461
> Project: Apache Gora
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> Here is related code:
> {code}
> Pair<byte[][], byte[][]> keys = table.getStartEndKeys();
> if (keys == null || keys.getFirst() == null ||
> keys.getFirst().length == 0) {
> throw new IOException("Expecting at least one region.");
> }
> if (table == null) {
> throw new IOException("No table was provided.");
> {code}
> The null check is ineffective since table has been de-referenced before the
> check.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)