Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E31110316 for ; Sun, 21 Apr 2013 00:43:18 +0000 (UTC) Received: (qmail 37799 invoked by uid 500); 21 Apr 2013 00:43:17 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 37713 invoked by uid 500); 21 Apr 2013 00:43:17 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 37702 invoked by uid 99); 21 Apr 2013 00:43:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Apr 2013 00:43:17 +0000 Date: Sun, 21 Apr 2013 00:43:17 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IO-373) FileUtils.byteCountToDisplaySize improvement/rounding issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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