Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-424

[classlib][text] NullPointerException in java.text.DecimalFormat.getCurrency()

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Environment:
      WIN with Russian defaults

      Description

      Consider the following code:

      System.out.println("Locale " + Locale.getDefault());
      System.out.println("Default " + Currency.getInstance(Locale.getDefault()));
      DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance();
      System.out.println("Currency "+format.getCurrency());

      It produses (on computer with Russian defaults):

      RI output:
      Locale ru_RU
      Default RUR
      Currency RUR

      Harmony output:
      Locale ru_RU
      Default RUR
      ?????????????? ???????? ? ???? "main" java.lang.NullPointerException
      at java.text.DecimalFormat.getCurrency(DecimalFormat.java:271)
      at test.main(test.java:10)

      org.apache.harmony.tests.java.text.DecimalFormatTest failed due this reason.
      Looks like a bug in icu4 lib (used in java.text.DecimalFormat).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              boris.v.kuznetsov Boris Kuznetsov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: