[ https://issues.apache.org/jira/browse/HBASE-10369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13874283#comment-13874283 ]
Ted Yu commented on HBASE-10369: -------------------------------- Integrated to 0.98 and trunk. Thanks for the review, Andy. > 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)