Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15117

Resolve ICAST findbugs warnings in current codes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None
    • Reviewed

    Description

      In findbugs output of recent build, we could see ICAST warnings (Result of integer multiplication cast to long) on Compactor and ExportSnapshot

      From the code I guess the design is to avoid multiplication result to overflow, however current implementation cannot achieve the goal. For example, output of below codes

      int i = 1000000;
      long a = i * i;
      long b = (long) i * i;
      System.out.println(a);
      System.out.println(b);
      

      will be

      -727379968
      1000000000000
      

      Will make some minor changes to resolve this issue.

      Attachments

        1. HBASE-15117.patch
          2 kB
          Yu Li

        Issue Links

          Activity

            People

              liyu Yu Li
              liyu Yu Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: