Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 85288 invoked from network); 25 Sep 2010 05:44:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Sep 2010 05:44:55 -0000 Received: (qmail 64267 invoked by uid 500); 25 Sep 2010 05:44:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 64201 invoked by uid 500); 25 Sep 2010 05:44:54 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 64194 invoked by uid 99); 25 Sep 2010 05:44:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 05:44:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 05:44:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8P5iXre009122 for ; Sat, 25 Sep 2010 05:44:33 GMT Message-ID: <7628613.397581285393473007.JavaMail.jira@thor> Date: Sat, 25 Sep 2010 01:44:33 -0400 (EDT) From: "Jin Yang (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6654) [classlib][luni]util:currency.getInstance does not throw IllegalArgumentException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HARMONY-6654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jin Yang updated HARMONY-6654: ------------------------------ > [classlib][luni]util:currency.getInstance does not throw IllegalArgumentException > --------------------------------------------------------------------------------- > > Key: HARMONY-6654 > URL: https://issues.apache.org/jira/browse/HARMONY-6654 > Project: Harmony > Issue Type: Bug > Reporter: Jin Yang > > executing this code > Currency c = Currency.getInstance("ABC"); > System.out.prvintln(c); > we get ABC as output in Harmony where as on SUN ri we get IllegalArgumentException because ABC is not a supported ISO 4217 code. > In our current design for getInstance(String currencyCode), we do not check the input currencyCode. If we use icu to check, it still doesn't work. ICU just checks if the input is a 3-letter alpha code while not to check if the input is a supported ISO 4217 code. So for ICU, "ABC" is also a valid input. > I think there 2 two ways to fix it: > 1. ask ICU to check the input. > 2. maintain a ISO 4217 code list in our implementation and to check the input by ourself. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.