Harmony
  1. Harmony
  2. HARMONY-6485

[classlib][text] DecimalFormat applyPattern error

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0M1
    • Fix Version/s: 6.0M3, 5.0M15
    • Component/s: Classlib
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      DecimalFormat's methods applyPattern and applyLocalizedPattern don't update max/min integer/fraction digits :
      DecimalFormat df = new DecimalFormat();
      df.applyPattern("#00.0#");
      System.out.print(df.getMinimumIntegerDigits() + " " + df.getMinimumFractionDigits() + " " + df.getMaximumFractionDigits());
      will print 1 0 3 instead of 2 1 2.

      1. java6.patch
        6 kB
        Pons Rudy
      2. java5.patch
        2 kB
        Pons Rudy

        Issue Links

          Activity

          Hide
          Mark Hindess added a comment -

          I've applied the java6 patch at r953307. Please confirm (by closing this JIRA) that both patches have been applied correctly. Thanks.

          Show
          Mark Hindess added a comment - I've applied the java6 patch at r953307. Please confirm (by closing this JIRA) that both patches have been applied correctly. Thanks.
          Hide
          Hudson added a comment -

          Integrated in Harmony-select-1.5-head-linux-x86_64 #27 (See http://hudson.zones.apache.org/hudson/job/Harmony-select-1.5-head-linux-x86_64/27/)
          Apply java5 patch from "#HARMONY-6485] [classlib][text] DecimalFormat
          applyPattern error".

          Show
          Hudson added a comment - Integrated in Harmony-select-1.5-head-linux-x86_64 #27 (See http://hudson.zones.apache.org/hudson/job/Harmony-select-1.5-head-linux-x86_64/27/ ) Apply java5 patch from "# HARMONY-6485 ] [classlib] [text] DecimalFormat applyPattern error".
          Hide
          Hudson added a comment -

          Integrated in Harmony-1.5-head-linux-x86_64 #839 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/839/)
          Apply java5 patch from "#HARMONY-6485] [classlib][text] DecimalFormat
          applyPattern error".

          Show
          Hudson added a comment - Integrated in Harmony-1.5-head-linux-x86_64 #839 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/839/ ) Apply java5 patch from "# HARMONY-6485 ] [classlib] [text] DecimalFormat applyPattern error".
          Hide
          Mark Hindess added a comment -

          I've applied the java5 patch at r953280. Please confirm that this has been applied as expected.

          Show
          Mark Hindess added a comment - I've applied the java5 patch at r953280. Please confirm that this has been applied as expected.
          Hide
          Pons Rudy added a comment -

          I have sent my ACQ/ICLA.

          Show
          Pons Rudy added a comment - I have sent my ACQ/ICLA.
          Hide
          Mark Hindess added a comment -

          Thank you for your contributions. Would you mind filling out an ACQ/ICLA as detailed in the contribution policy at:

          http://harmony.apache.org/contribution_policy.html

          Fill them in, scan them and send them to private@harmony.apache.org.

          Regards,
          Mark.

          Show
          Mark Hindess added a comment - Thank you for your contributions. Would you mind filling out an ACQ/ICLA as detailed in the contribution policy at: http://harmony.apache.org/contribution_policy.html Fill them in, scan them and send them to private@harmony.apache.org. Regards, Mark.
          Hide
          Pons Rudy added a comment -

          First patch corrects the bug for java5, and add regression tests.
          Second patch is for java6 branch : it also calls setRoundingIncrement if rounding mode isn't HALF_EVEN.

          Show
          Pons Rudy added a comment - First patch corrects the bug for java5, and add regression tests. Second patch is for java6 branch : it also calls setRoundingIncrement if rounding mode isn't HALF_EVEN.

            People

            • Assignee:
              Mark Hindess
              Reporter:
              Pons Rudy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development