commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Broadley (JIRA)" <>
Subject [jira] [Commented] (IO-226) Rounding issue with byteCountToDisplaySize(long size)
Date Fri, 05 Oct 2012 16:32:02 GMT


Simon Broadley commented on IO-226:

The comment here seems to be saying that it has now been changed to show three significant
figures, but the version I'm using, from commons-io 2.4 still rounds down?
Have I misunderstood, is the version information wrong, or has it been rolled back (I hope
> Rounding issue with byteCountToDisplaySize(long size)
> -----------------------------------------------------
>                 Key: IO-226
>                 URL:
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>            Reporter: shu kai yuan
>             Fix For: 2.0
>         Attachments: roundedByteCountToDisplaySize.patch
> I do not understand the byteCountToDisplaySize(long size) method which is in  class FileUtils
of the package
> If  the parameter size is 2047 , the method will return 1 KB.Why it will lose precision.
> I read the code. 
> Maybe it is a bug?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message