bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/70658] New: Negative suffix not properly handlded in Deci


From: guillerodriguez.dev at gmail dot com
Subject: [Bug classpath/70658] New: Negative suffix not properly handlded in DecimalFormat
Date: Thu, 14 Apr 2016 10:15:36 +0000

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70658

            Bug ID: 70658
           Summary: Negative suffix not properly handlded in DecimalFormat
           Product: classpath
           Version: 0.99
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guillerodriguez.dev at gmail dot com
  Target Milestone: ---

When a negative subpattern is not explicitly defined, DecimalFormat should use
the "positive suffix" for negative values as well.

Simple test case to reproduce the problem:

  DecimalFormat tempFormat = new DecimalFormat("0.0 unit");
  System.out.println(tempFormat.format(4.3));
  System.out.println(tempFormat.format(-4.3));

Yields:

4.3 unit
-4.3

Should be:

4.3 unit
-4.3 unit


reply via email to

[Prev in Thread] Current Thread [Next in Thread]