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

Jonathan Hsieh commented on HBASE-5654:
---------------------------------------

There are a few match related entries:

Here's how one could likely be fixed.

{code}
  public static long calculateOverhead(long maxSize, long blockSize, int 
concurrency){
    // FindBugs ICAST_INTEGER_MULTIPLY_CAST_TO_LONG
    return CACHE_FIXED_OVERHEAD + ClassSize.CONCURRENT_HASHMAP +
        ((long)Math.ceil(maxSize*1.2/blockSize)
            * ClassSize.CONCURRENT_HASHMAP_ENTRY) +
      //  (concurrency * ClassSize.CONCURRENT_HASHMAP_SEGMENT);
      ((long)concurrency * (long)ClassSize.CONCURRENT_HASHMAP_SEGMENT);
  }
{code}

For bounds checks, I think there was another where a double gets converted to a 
long (what happens is double is larger than max long?)
                
> [findbugs] Address dodgy bugs
> -----------------------------
>
>                 Key: HBASE-5654
>                 URL: https://issues.apache.org/jira/browse/HBASE-5654
>             Project: HBase
>          Issue Type: Sub-task
>          Components: scripts
>    Affects Versions: 0.96.0
>            Reporter: Jonathan Hsieh
>            Assignee: Ashutosh Jindal
>              Labels: patch
>             Fix For: 0.96.0
>
>         Attachments: Hbase-5654.patch
>
>
> See 
> https://builds.apache.org/job/PreCommit-HBASE-Build/1313//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html#Warnings_STYLE
> This may be broken down further.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to