gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GORA-461) Ineffective null check in HBaseStore#getPartitions
Date Fri, 15 Jan 2016 17:03:39 GMT
Ted Yu created GORA-461:

             Summary: 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:
    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.");
The null check is ineffective since table has been de-referenced before the check.

This message was sent by Atlassian JIRA

View raw message