Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7102969

currency.properties supercede not working correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 7
    • core-libs
    • b120
    • x86
    • windows_xp

    Description

      FULL PRODUCT VERSION :
      java version "1.7.0_01"
      Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
      Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      According to the java.util.Currency API: Users can supersede the Java runtime currency data by creating a properties file named <JAVA_HOME>/lib/currency.properties.

      The example given works:
      JP=JPZ,999,0

      However, this does not:
      JP=ABC,999,0

      The above currency.properties file gives "JPC" as the currency code rather than "ABC".

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Create currency.properties file that looks like this:
      JP=ABC,999,0

      2. Check list of available currencies (Currency.getAvailableCurrencies())

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      List of currencies including "ABC"
      ACTUAL -
      List of currencies including "JPC"

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.util.*;

      public class CurrencyTest {

      public static void main(String[] args) {
      for(Currency c : Currency.getAvailableCurrencies())
      System.out.println(c.getCurrencyCode());
      }

      }
      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              nishjain Nishit Jain
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: