Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 18068 invoked from network); 22 Apr 2005 03:40:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Apr 2005 03:40:48 -0000 Received: (qmail 71592 invoked by uid 500); 22 Apr 2005 03:41:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 71549 invoked by uid 500); 22 Apr 2005 03:41:07 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 71535 invoked by uid 99); 22 Apr 2005 03:41:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from brmea-mail-4.Sun.COM (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 21 Apr 2005 20:41:07 -0700 Received: from phys-mpk-1 ([129.146.11.81]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j3M3ehi7014598 for ; Thu, 21 Apr 2005 21:40:44 -0600 (MDT) Received: from conversion-daemon.mpk-mail1.sfbay.sun.com by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IFB00501WTGBN@mpk-mail1.sfbay.sun.com> (original mail from David.Vancouvering@Sun.COM) for derby-dev@db.apache.org; Thu, 21 Apr 2005 20:40:43 -0700 (PDT) Received: from sun.com (vpn-129-150-26-219.SFBay.Sun.COM [129.150.26.219]) by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IFB00GVAWVPZH@mpk-mail1.sfbay.sun.com> for derby-dev@db.apache.org; Thu, 21 Apr 2005 20:40:38 -0700 (PDT) Date: Thu, 21 Apr 2005 20:40:59 -0700 From: David Van Couvering Subject: Re: Sun, Java and BigDecimal incompatible changes in J2SE 5.0 In-reply-to: <42681FB3.8010206@debrunners.com> To: Derby Development Message-id: <4268724B.9020908@sun.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 References: <42681FB3.8010206@debrunners.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, Dan. Those of us on the list are pretty far away from these kinds of changes to J2SE. That said, I do have some contacts, and will try and follow-up on this and get back to you. Your open-ended question "are there any more incompatibilities like this that could break Derby code?" I think implies are there any more *known* incompatibilities. I'll try to find that out too. David Daniel John Debrunner wrote: > I'm wonder if any of the Sun folks on the list can help out, J2SE 5.0 > has changed the behaviour of java.math.BigDecimal in incompatible ways > from JDK 1.4.x, but these are not mentioned in > > http://java.sun.com/j2se/1.5.0/compatibility.html > > Is there any document that details all the ways J2SE 5.0's BigDecimal is > incompatible with all earlier Java releases? > > While we changed Derby to address the change in behaviour of > BigDecimal.toString() a while ago, I just discovered another change that > breaks Derby and potentially other applications. The method > BigDecimal.scale() used to be > > (JDK 1.4.1 javadoc) > Returns the scale of this BigDecimal. (The scale is the number of digits > to the right of the decimal point.) > > but now it can return negative numbers > > (J2SE 5.0 docs) > Returns the scale of this BigDecimal. If zero or positive, the scale is > the number of digits to the right of the decimal point. If negative, the > unscaled value of the number is multiplied by ten to the power of the > negation of the scale. For example, a scale of -3 means the unscaled > value is multiplied by 1000. > > > I discovered this when looking at Derby-225 and simple cleanup changes > that should have not fixed the issue suddenly fixed it. Further > investigation showed a scale of -302 which of course confused the > existing code. > > I wonder if there are any more incompatibilities in this class that > could break Derby code? > > Thanks, > Dan. >