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

Error while fetching currency instance by Currency.getInstance(currencycode)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • None
    • core-libs
    • b120
    • Verified

    Description

      As per the default CurrencyData.properties the currency "MAD" is pointed by two countries "MA" (# MOROCCO MA=MAD) and "EH" (# WESTERN SAHARA EH=MAD)
      While fetching the currency instance using Currency.getInstance("MAD") is returning correct value.

      But when the currency entry MA=>MAD is overrided/superseded by another currency entry in currency.properties file e.g. MA=MAN,555,0. The Currency.getInstance("MAD") method is throwing IllegalArgumentException even if the currency "MAD" being still pointed by EH.

      Also, Currency.getAvailableCurrencies() is not returning "MAD" in the list of currencies after the change made by currency.properties.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: