hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18434) Address some alerts raised by lgtm.com
Date Tue, 25 Jul 2017 07:40:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-18434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099641#comment-16099641

Malcolm Taylor commented on HBASE-18434:

Attached patch 001.
1) uses try-with-resources to make sure files get closed after use
2) where result of integer multiplication is assigned to a long, casts one argument to long
to protect against possible overflow
3) replaces a boxed type with a primitive type where there is no possibility of a null value
4) added a test which fails on master but passes with this patch

> Address some alerts raised by lgtm.com
> --------------------------------------
>                 Key: HBASE-18434
>                 URL: https://issues.apache.org/jira/browse/HBASE-18434
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Malcolm Taylor
>            Assignee: Malcolm Taylor
>         Attachments: HBASE-18434.master.001.patch
> lgtm.com has identified a number of issues in the code, see https://lgtm.com/projects/g/apache/hbase/alerts/
> This ticket is to address some of those issues, such as resources not being closed; and
results of integer multiplication being cast to long (with potential for overflow).

This message was sent by Atlassian JIRA

View raw message