Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 89736 invoked from network); 12 May 2006 10:17:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 May 2006 10:17:32 -0000 Received: (qmail 41627 invoked by uid 500); 12 May 2006 10:17:26 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 41559 invoked by uid 500); 12 May 2006 10:17:24 -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 41548 invoked by uid 99); 12 May 2006 10:17:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 May 2006 03:17:24 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_SORBS_WEB,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of george.c.harley@googlemail.com designates 72.14.204.231 as permitted sender) Received: from [72.14.204.231] (HELO qb-out-0506.google.com) (72.14.204.231) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 May 2006 03:17:22 -0700 Received: by qb-out-0506.google.com with SMTP id q11so21011qbq for ; Fri, 12 May 2006 03:17:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=i2fXlSAUtHdXXpUHXHCaEYS/WwtHLfg5xubGcA4A4CIdQ+Tq5LwvoGXINmuIs8B2QGY9+QIJ7uIFwjnBAG/2HaudBD2Uvf8rGfTsq+vK0waEnIQXt05GfaT2vuiWf3ViRlJsX2M4LKCBlstfpaXGw2FOkEckS2t/4mbgG6fV0r0= Received: by 10.37.14.47 with SMTP id r47mr2210086nzi; Fri, 12 May 2006 03:17:01 -0700 (PDT) Received: from ?9.20.183.73? ( [195.212.29.92]) by mx.gmail.com with ESMTP id 20sm11543191nzp.2006.05.12.03.17.00; Fri, 12 May 2006 03:17:01 -0700 (PDT) Message-ID: <44646097.2060902@googlemail.com> Date: Fri, 12 May 2006 11:16:55 +0100 From: George Harley Reply-To: harmony-dev@incubator.apache.org User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib] Exception throwing compatibility References: <002001c67586$d70c68e0$6501a8c0@OFFICEDESKTOP> <4464575A.5090606@googlemail.com> <200605121205.14702.chris.gray@kiffer.be> In-Reply-To: <200605121205.14702.chris.gray@kiffer.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 Chris Gray wrote: > On Friday 12 May 2006 11:37, George Harley wrote: > >> Nathan Beyer wrote: >> >>> Note, the RI is NOT throwing ArrayIndexOutOfBoundsExceptions, it is just >>> letting them happen via invalid array look ups, but in these cases, the >>> specification is marked with an IndexOutOfBoundsException. >>> >> Hi Nathan, >> >> If we consider the RI as a "black box" whose internals should be >> completely hidden from us - a starting point that I think is important >> to all participants of this project (and their legal representatives) - >> then it does not matter *why* the RI is throwing the AIOOBE. It just does. >> > > Right, and in general we cannot know exactly which exception type the RI will > throw in any specific case - we have to start from the assumption that it > follows the spec, and take note of any deviations or more specific behaviour > that turns up. It's not possible to exhaustively test every exception case. > Hi Chris, Absolutely agree with you that we should not be looking to exhaustively test every exception case. We have to work in a mode where we respond to each deviation as we become aware of them. > >> What will matter more to potential Harmony adopters ? Adherence to the >> spec or ease of transition of their apps from the RI to Harmony ? In >> this case we can satisfy the spec and enable runtime compatibility by >> throwing the identical concrete exception type. >> > > If the app is written to the spec there's no problem. But in real life it can > happen that the developer doesn't look at the spec - during testing her code > throws an AIOOBE, so she adds an exception handler for that case. In this > case we make this (incorrect) app run by copying RI's behaviour (insofar as > we can determine what this is). But if RI throws > sun.util.FunnyIndexOutOfBoundsException and the programmer codes to this, > we're hosed - the app has to fixed. > > Chris > Indeed. We can only throw something with the same public/non-implementation-specific supertype and hope for the best. Best regards, George > > --------------------------------------------------------------------- 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