hbase-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] (HBASE-10369) LabelExpander#createLabels() should close scanner in finally clause
Date Thu, 16 Jan 2014 23:43:19 GMT
Ted Yu created HBASE-10369:
------------------------------

             Summary: LabelExpander#createLabels() should close scanner in finally clause
                 Key: HBASE-10369
                 URL: https://issues.apache.org/jira/browse/HBASE-10369
             Project: HBase
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


Here is related code:
{code}
      while (true) {
        Result next = scanner.next();
        if (next == null) {
          break;
        }
        byte[] row = next.getRow();
        byte[] value = next.getValue(LABELS_TABLE_FAMILY, LABEL_QUALIFIER);
        labels.put(Bytes.toString(value), Bytes.toInt(row));
      }
      scanner.close();
    } finally {
{code}
If scanner.next() throws exception, scanner would be left open.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message