title: int value cast to float and then passed to Math.round
body: <p>I have a method which creates a file size String for displaying to the user. FindBugs is saying that an <strong>int is cast into a float and then passed to Math.round</strong>.   </p>
  
  <pre><code> public static String createFileSizeString(long size)
   {
      if (size &lt; 1024)
      {
         return size + " bytes";
      }
      else if (size &lt; 1048576)
      {
         return (Math.round(((size * 10) / 1024)) / 10) + " KB";
      }
      else
      {
         return (Math.round(((size * 10) / 1048576)) / 10) + " MB";
      }
   }
  </code></pre>
  
  <p>FindBugs goes on to say: "This operation should always be a no-op, since the converting an integer to a float should give a number with no fractional part. It is likely that the operation that generated the value to be passed to Math.round was intended to be performed using floating point arithmetic."</p>
  
  <p>How is it a no-op? Should I add an explicit cast to <code>(size * 10) / 1024</code> so that <code>((float)size * 10) / 1024</code> appears instead?</p>