Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 19239 invoked from network); 20 Feb 2006 14:11:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Feb 2006 14:11:56 -0000 Received: (qmail 678 invoked by uid 500); 20 Feb 2006 14:11:52 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 323 invoked by uid 500); 20 Feb 2006 14:11:48 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 99752 invoked by uid 99); 20 Feb 2006 14:11:47 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2006 06:11:45 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id E8F08DF for ; Mon, 20 Feb 2006 15:11:24 +0100 (CET) Message-ID: <876266679.1140444684952.JavaMail.jira@ajax.apache.org> Date: Mon, 20 Feb 2006 15:11:24 +0100 (CET) From: "Richard Liang (JIRA)" To: harmony-dev@incubator.apache.org Subject: [jira] Created: (HARMONY-107) java.text.DecimalFormat does not parse infinite values correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N java.text.DecimalFormat does not parse infinite values correctly ---------------------------------------------------------------- Key: HARMONY-107 URL: http://issues.apache.org/jira/browse/HARMONY-107 Project: Harmony Type: Bug Components: Classlib Reporter: Richard Liang In Java 1.4.2 Spec of java.text.DecimalFormat.parse(String, ParsePosition), it's said: Values that cannot fit into a Long are returned as Doubles. This includes values with a fractional part, infinite values, NaN, and the value -0.0. The test cases will fail if excuting under Harmony and pass on RI: // Test whether DecimalFormat can parse Positive infinity correctly public void testParseInfinityBigDecimalFalse() { DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance(); DecimalFormatSymbols symbols = new DecimalFormatSymbols(); Number number = format.parse(symbols.getInfinity(), new ParsePosition(0)); assertTrue(number instanceof Double); assertTrue(Double.isInfinite(number.doubleValue())); } // Test whether DecimalFormat can parse Negative infinity correctly public void testParseMinusInfinityBigDecimalFalse() { DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance(); DecimalFormatSymbols symbols = new DecimalFormatSymbols(); Number number = format.parse("-" + symbols.getInfinity(), new ParsePosition(0)); assertTrue(number instanceof Double); assertTrue(Double.isInfinite(number.doubleValue())); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira