You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Mike Drob (JIRA)" <ji...@apache.org> on 2014/07/01 20:22:26 UTC

[jira] [Updated] (HBASE-11413) [findbugs] RV: Negating the result of compareTo()/compare()

     [ https://issues.apache.org/jira/browse/HBASE-11413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Drob updated HBASE-11413:
------------------------------

    Status: Patch Available  (was: Open)

Resubmitting for QA Bot

> [findbugs] RV: Negating the result of compareTo()/compare()
> -----------------------------------------------------------
>
>                 Key: HBASE-11413
>                 URL: https://issues.apache.org/jira/browse/HBASE-11413
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Mike Drob
>            Priority: Trivial
>         Attachments: HBASE-11413.patch
>
>
> Finbugs warns that {{CatalogJanitor.java}}, {{NamespaceUpgrade.java}} and {{FSTableDescriptors.java}} have the following warning:
> {quote}
> RV: Negating the result of compareTo()/compare() (RV_NEGATING_RESULT_OF_COMPARETO)
> This code negatives the return value of a compareTo or compare method. This is a questionable or bad programming practice, since if the return value is Integer.MIN_VALUE, negating the return value won't negate the sign of the result. You can achieve the same intended result by reversing the order of the operands rather than by negating the results. 
> {quote}



--
This message was sent by Atlassian JIRA
(v6.2#6252)