[
https://issues.apache.org/jira/browse/HBASE-10369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ted Yu reassigned HBASE-10369:
------------------------------
Assignee: Ted Yu
> 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
> Assignee: Ted Yu
> Priority: Minor
> Attachments: 10369-v1.txt
>
>
> 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)