JDK-6609364 : Currency needs to support changed code CSD -> RSD
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-09-26
  • Updated: 2010-07-29
  • Resolved: 2007-09-26
Related Reports
Duplicate :  
Description
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 ----------

Comments
EVALUATION Duplicate of 6496226.
26-09-2007