Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 95273 invoked from network); 11 May 2006 05:20:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 May 2006 05:20:58 -0000 Received: (qmail 52770 invoked by uid 500); 10 May 2006 18:07:36 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 52714 invoked by uid 500); 10 May 2006 18:07:36 -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 52702 invoked by uid 99); 10 May 2006 18:07:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 May 2006 11:07:35 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=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 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 May 2006 11:07:35 -0700 Received: by nf-out-0910.google.com with SMTP id x37so1574501nfc for ; Wed, 10 May 2006 11:07:13 -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:content-type:content-transfer-encoding; b=W2gH9WT356HVhR724oyTg2nJU3/PMhSWry4pDCLNQ+OjCm0DZkJt7cr+bYlnEUhm3DhoiQu2+yzFchc2jHUMc5NAjQ6dEJqljOO67IrSoMm+3l+2vkN/rvz0VBdHwWVSJ7OeTUwiD/KhwuZMg8A/jI6tVLCLkNwJdJWFrpg3Gh8= Received: by 10.49.30.3 with SMTP id h3mr823753nfj; Wed, 10 May 2006 11:07:12 -0700 (PDT) Received: from ?9.20.183.73? ( [195.212.29.75]) by mx.gmail.com with ESMTP id n22sm4948436nfc.2006.05.10.11.07.12; Wed, 10 May 2006 11:07:12 -0700 (PDT) Message-ID: <44622BCE.2050109@googlemail.com> Date: Wed, 10 May 2006 19:07:10 +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 Subject: [classlib] Exception throwing compatibility 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 Hi, I would like to start a little discussion around JIRA issue 436 [1] which deals with exception throwing compatibility between Harmony and the RI. I feel it is important to reach a concrete agreement on this as so far all of the participants in the issue seem to disagree about the interpretation of the compatibility guidelines on our web site [2]. You can read the discussion for yourself on the JIRA page (it is only a handful of comments) but if you are pressed for time the essentials are this (IMHO - Nathan and Dmitry please feel free to fill in the gaps) : * Currently the Harmony implementation of a few public methods in StringBuffer and StringBuilder throw different runtime exceptions from the RI under certain failure scenarios. * Where the Javadoc mentions the exception type that ought to be thrown it mentions a type (j.l.IndexOutOfBoundsException) but the Harmony and RI implementations differ in that they are throwing different *sub-types* of j.l.IndexOutOfBoundsException. The RI tends to throw j.l.ArrayIndexOutOfBoundsException while Harmony tends to throw j.l.StringIndexOutOfBoundsException. * Dmitry (who raised the issue) believes that we should change the Harmony code to throw the type named in the Javadoc/specification (i.e. the supertype j.l.IndexOutOfBoundsException). * Nathan believes that the code already abides by the specification and that there is no need for any change in this area. * Little old me thinks that there *is* a problem here but that the solution is to do as the RI does and throw exceptions with the very same runtime type as the RI. That's based on my interpretation of the exception-throwing compatibility guidelines [2], in particular the fragment "Harmony class library code should throw exceptions of the same type as the RI". If I recall correctly we did agree to discuss such compatibility matters on a case-by-case basis. So, dear reader, what do you think is the correct course of action in this case ? Best regards, George [1] http://issues.apache.org/jira/browse/HARMONY-436 [2] http://incubator.apache.org/harmony/subcomponents/classlibrary/compat.html --------------------------------------------------------------------- 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