From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3748 invoked by alias); 3 Jul 2007 13:11:06 -0000 Received: (qmail 3738 invoked by uid 22791); 3 Jul 2007 13:11:05 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Jul 2007 13:11:02 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l63DB0iw008291; Tue, 3 Jul 2007 09:11:00 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l63DAxCr019705; Tue, 3 Jul 2007 09:10:59 -0400 Received: from [172.16.14.161] (toothpaste.toronto.redhat.com [172.16.14.161]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l63DAwZk003344; Tue, 3 Jul 2007 09:10:59 -0400 Subject: Re: FYI: Test Fix From: Tania Bento To: Mario Torre Cc: mauve-patches In-Reply-To: <1183156031.4044.19.camel@nirvana.limasoftware.net> References: <1183145922.18659.11.camel@toothpaste.toronto.redhat.com> <1183156031.4044.19.camel@nirvana.limasoftware.net> Content-Type: text/plain Date: Tue, 03 Jul 2007 13:11:00 -0000 Message-Id: <1183468257.18659.17.camel@toothpaste.toronto.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 (2.10.1-4.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2007/txt/msg00038.txt.bz2 Hey Mario! On Sat, 2007-06-30 at 00:27 +0200, Mario Torre wrote: > Hi Tania! > > You are breaking Classpath!! :P > > With Classpath CVS and JDK 1.6: > > prior to the patch: > > PASS: gnu.testlet.java.lang.Integer.parseInt (number 12) > PASS: gnu.testlet.java.lang.Integer.parseInt (number 13) > PASS: gnu.testlet.java.lang.Integer.parseInt (number 14) > > after the patch: > > FAIL: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw > NumberFormatException (number 0) > PASS: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw > NumberFormatException (number 1) > PASS: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw > NumberFormatException (number 2) > > So the test is wrong somewhere. I know that the javadoc for java 7 > states that '+' is a valid character, but I think this is too much a > work in progress to include it as a test, removing old tests, especially > if this ends up that current stable version fails, while development > snapshots (whose specs may change at any time) works. I would wait to > see that finalized, or just write a test specifically for IcedTea. > > If you think there is a reason to break current behaviour ahead of time, > please, go further and don't listen to me, but in this case I guess that > a patch for classpath to fix it is needed too. > > Of course, this is only my opinion. You are right! If only '+' is passed as an argument to java.lang.parseInt(String) a NumberFormatException should be thrown. Currently, the reference implementation does not throw such error in this case, so, I didn't want to submit a patch to classpath just yet. On Friday, I submitted a new bug report to Sun and they're responded stating that this is a new bug. Here is the link: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6576055. I will be submitting a patch to classpath shortly. Hope this makes sense! Cheers, Tania