commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IO-373) FileUtils.byteCountToDisplaySize improvement/rounding issues
Date Sun, 21 Apr 2013 00:43:17 GMT

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

Sebb commented on IO-373:
-------------------------

The proposed patch has some odd behaviour for maxChars <=3 - as shown in the test cases.
In particular, zero can be shown for values that are not zero. This cannot happen with the
current code.

Seems to me it might make more sense to specify the number of decimals to print, rather than
the maximum numeric field size.

==

In case some user code is relying on the current behaviour the current methods should be kept
as is - and should not delegate to the new methods.
                
> FileUtils.byteCountToDisplaySize improvement/rounding issues
> ------------------------------------------------------------
>
>                 Key: IO-373
>                 URL: https://issues.apache.org/jira/browse/IO-373
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.4
>            Reporter: Mark
>            Priority: Minor
>
> Issue IO-226 is not fixed but closed.
> ?
> Here is my solution that also support a user-defined precision in terms of a maximum
length of the digits part.

--
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: http://www.atlassian.com/software/jira

Mime
View raw message