Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 20257 invoked from network); 10 Jul 2006 10:51:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jul 2006 10:51:46 -0000 Received: (qmail 65413 invoked by uid 500); 10 Jul 2006 10:51:41 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 65373 invoked by uid 500); 10 Jul 2006 10:51:41 -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 65362 invoked by uid 99); 10 Jul 2006 10:51:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2006 03:51:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.33.31.233] (HELO marlow.intranet.hisitech.com) (81.33.31.233) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2006 03:51:40 -0700 Received: from localhost (localhost [127.0.0.1]) by marlow.intranet.hisitech.com (Postfix) with ESMTP id CC63711453D; Mon, 10 Jul 2006 12:51:26 +0200 (CEST) Subject: Re: [classlib][math]compatibility: different values for BigDecimal(null, mc).toBigInteger() for Harmony and RI From: Santiago Gala To: geir@pobox.com Cc: harmony-dev@incubator.apache.org In-Reply-To: <44B18467.6050400@pobox.com> References: <21977080.1152188431293.JavaMail.jira@brutus> <44B166FE.106@gmail.com> <44B18467.6050400@pobox.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-rA7AnV+g7pIE9QtYZCdO" Organization: Apache Software Foundation Date: Mon, 10 Jul 2006 12:51:23 +0200 Message-Id: <1152528684.17876.1.camel@marlow> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=-rA7AnV+g7pIE9QtYZCdO Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable El dom, 09-07-2006 a las 18:34 -0400, Geir Magnusson Jr escribi=C3=B3: >=20 > Tim Ellison wrote: > > The reference implementation doesn't make sense in this example, and it > > is highly unlikely that any application will be dependent upon this > > behavior, so I propose that we do not apply this patch. >=20 > +1 >=20 > (I pondered suggesting returning BigDecimal.valueOf(0), but that's not > right either... Hard to imagine why the behavior of BigDecimal(null) is > unspecified...) >=20 IBM-jdk-1.5.0-SR2 throws a NullPointerException with this test case, which looks like saner than any other of the behaviours commented here. Regards Santiago > geir >=20 > >=20 > > If anyone objects to this decision I will happily reopen it. > >=20 > > Regards, > > Tim > >=20 > >=20 > > Vladimir Ivanov (JIRA) wrote: > >> [classlib][math]compatibility: different values for BigDecimal(null, m= c).toBigInteger() for Harmony and RI > >> ----------------------------------------------------------------------= ------------------------------------ > >> > >> Key: HARMONY-786 > >> URL: http://issues.apache.org/jira/browse/HARMONY-786 > >> Project: Harmony > >> Type: Bug > >> > >> Components: Classlib =20 > >> Reporter: Vladimir Ivanov > >> > >> > >> The Harmony method java.math.BigDecimal(BigInteger, mc).toBigInteger()= returns 'null' while RI returns -9223372036854775808. > >> > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D test.java =3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> import java.math.*; > >> public class test { > >> public static void main(String args[] ) { > >> System.out.println("" + new BigDecimal((BigInteger) null, MathContext= .UNLIMITED).toBigInteger()) ; > >> } > >> } > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> > >> Output: > >> C:\tmp\tmp17>C:\jdk1.5.0_06\bin\java.exe -showversion test > >> java version "1.5.0_06" > >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > >> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > >> > >> -9223372036854775808 > >> > >> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversio= n test > >> java version "1.5.0" > >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > >> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0= .0-75, GC: System optimized over throughput (initial strategy singleparpar)= ) > >> > >> null > >> > >> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showve= rsion test > >> java version 1.5 (subset) > >> > >> (c) Copyright 1991, 2006 The Apache Software Foundation or its licenso= rs, as applicable. > >> null > >> > >> > >=20 >=20 > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > For additional commands, e-mail: harmony-dev-help@incubator.apache.org >=20 --=20 VP and Chair, Apache Portals (http://portals.apache.org) Apache Software Foundation --=-rA7AnV+g7pIE9QtYZCdO Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) iD8DBQBEsjEqZAeG2a2/nhoRAu12AJ42SOuOgyXBj3IHzEKnwvu3B7rNawCeK1QZ k+FjbpDwNXacWMAU3dAMI64= =Po2d -----END PGP SIGNATURE----- --=-rA7AnV+g7pIE9QtYZCdO--