Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 85867 invoked from network); 17 Nov 2009 18:14:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Nov 2009 18:14:07 -0000 Received: (qmail 60357 invoked by uid 500); 17 Nov 2009 18:14:06 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 60262 invoked by uid 500); 17 Nov 2009 18:14:06 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 60251 invoked by uid 99); 17 Nov 2009 18:14:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 18:14:06 +0000 X-ASF-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_MED X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jjb@google.com designates 216.239.33.17 as permitted sender) Received: from [216.239.33.17] (HELO smtp-out.google.com) (216.239.33.17) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2009 18:14:03 +0000 Received: from zps18.corp.google.com (zps18.corp.google.com [172.25.146.18]) by smtp-out.google.com with ESMTP id nAHIDfcp024803 for ; Tue, 17 Nov 2009 18:13:41 GMT DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1258481622; bh=wULr5Rramx7vk6oBGfc/Lvd/mj8=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Content-Type; b=EOvXD8SvGMkCAns8F07XFdoEIc1MFHZDFIC7rZ0p/wYyWViXhXY0pnxyHf5U/GLRZ xYq5TwzPcyqNHe6D2NaUA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: content-type:x-system-of-record; b=YWeNm2UQFiBM9JgvR235MhPUBQ77YE4qPUOjLe6JhoAJBB50O8QGJpAhdStWcXJti B8tRnkTMoblmZMQflGrzA== Received: from pxi5 (pxi5.prod.google.com [10.243.27.5]) by zps18.corp.google.com with ESMTP id nAHIDbJa009364 for ; Tue, 17 Nov 2009 10:13:38 -0800 Received: by pxi5 with SMTP id 5so167120pxi.12 for ; Tue, 17 Nov 2009 10:13:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.118.9 with SMTP id q9mr1005155wfc.49.1258481617750; Tue, 17 Nov 2009 10:13:37 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Nov 2009 10:13:37 -0800 Message-ID: <17b2302a0911171013j34f6bb48ia0899a3ec97bff8f@mail.gmail.com> Subject: Re: Doubting exception priority compatibility From: Joshua Bloch To: dev@harmony.apache.org Content-Type: multipart/alternative; boundary=001636e0b854c84a940478951598 X-System-Of-Record: true --001636e0b854c84a940478951598 Content-Type: text/plain; charset=ISO-8859-1 I would argue that we are doing a better job of ensuring compatibility with the RI by *not* mandating the same exception priority on these exceptions. In the RI, they can (and do) change even in minor releases. Our tests are mandating compatibility with a random snapshot of the RI on an implementation detail that the RI maintainers consider unimportant. We are thus encouraging our users to depend on this implementation detail. That just doesn't make sense. Interestingly, Sun went so far as to *prohibit *specifying which exception is to be thrown if multiple exceptions apply, 8 years ago: http://bugs.sun.com/view_bug.do?bug_id=4462062 . They actually filed a bug to change some documentation that specified this implementation detail Josh P.S. I would add several exceptions to Jesse's list including ClassCastException (common for sorted collections, and highly implementation dependent). On Tue, Nov 17, 2009 at 9:20 AM, Jesse Wilson wrote: > For better or for worse, Dalvik was changed long ago to ignore exception > priorities. We get exception messages for NPEs and save branches. The full > set of deltas are here: > > > http://www.google.com/codesearch?q=multiple+errors+lang:java+package:git://android.git.kernel.org/platform/dalvik.git > > 2009/11/17 Alexei Fedotov > > > > I don't argue changing exception order for a particular case if the > > change improves code simplicity and gives performance benefit on > > important real load, e.g. the change improved Eclipse startup time by > > 4%. > > > > I think the primary difference in our thinking is how much we value > exception priority consistency. I don't believe it has any value and > therefore we're imposing an unnecessary constraint on our code. Does anyone > have a real world example, (perhaps a bugreport) demonstrating where > exception priority incompatibility has caused grief? > --001636e0b854c84a940478951598--