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

Currency needs to support changed code CSD -> RSD

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs

      FULL PRODUCT VERSION :
      java version "1.5.0_07"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]
      Linux server 2.6.9-42.0.3.ELsmp #1 SMP Mon Sep 25 17:24:31 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      See http://en.wikipedia.org/wiki/Serbian_dinar
      and http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html
      and http://en.wikipedia.org/wiki/ISO_4217

      On October 25, 2006 the currency code CSD was replaced with RSD. The JDK/JRE needs to reflect this.

      Relates to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4990462, Redesign Currency to be extensible.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      java.util.Currency.getInstance("RSD")

      Throws an exception when it should return a valid Currency instance - the one it currently returns for "CSD".

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      java.util.Currency.getInstance("RSD") should return a valid Currency instance - the one it currently returns for "CSD".
      ACTUAL -
      java.lang.IllegalArgumentException
      at java.util.Currency.getInstance(Unknown Source)
      at java.util.Currency.getInstance(Unknown Source)


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.IllegalArgumentException
      at java.util.Currency.getInstance(Unknown Source)
      at java.util.Currency.getInstance(Unknown Source)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package com.dummy;

      import java.util.Currency;

      public class RSDTest {

      public static void main(String[] args) {
      System.out.println("Currency code from Currency instance for 'RSD': ");
      System.out.println(Currency.getInstance("RSD"));
      }
      }

      ---------- END SOURCE ----------

            naoto Naoto Sato
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: