Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 29034 invoked from network); 25 Dec 2006 01:34:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Dec 2006 01:34:41 -0000 Received: (qmail 3789 invoked by uid 500); 25 Dec 2006 01:34:42 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 3755 invoked by uid 500); 25 Dec 2006 01:34:42 -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 3745 invoked by uid 99); 25 Dec 2006 01:34:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Dec 2006 17:34:42 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of zhanghuangzhu@gmail.com designates 64.233.182.190 as permitted sender) Received: from [64.233.182.190] (HELO nf-out-0910.google.com) (64.233.182.190) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Dec 2006 17:34:32 -0800 Received: by nf-out-0910.google.com with SMTP id a4so4350136nfc for ; Sun, 24 Dec 2006 17:34:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=e8A+2UWZ5N75Y36y3z2hSgHmM2DWKRVaBy7EuyWz/GUF+OT/UFa+tUMOyTpbjciADG2sugbmkuWvb/JJBr+xfSv+Up31tIbiTGxbYcaT5Ej0JXGmJsvmtPBaMxyQOGce9nvByWO2SduUrcsk1s7v178opMnggbC90AQRRpRYes4= Received: by 10.82.127.15 with SMTP id z15mr781069buc.1167010450231; Sun, 24 Dec 2006 17:34:10 -0800 (PST) Received: by 10.82.115.8 with HTTP; Sun, 24 Dec 2006 17:34:10 -0800 (PST) Message-ID: <4d0b24970612241734n1f0f028dpa7b97e07bf75d77b@mail.gmail.com> Date: Mon, 25 Dec 2006 09:34:10 +0800 From: "Andrew Zhang" To: dev@harmony.apache.org Subject: Re: Compatibility or non-bug question In-Reply-To: <3D8E84095C6A524A985B787423094E40912580@mssmsx411> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_86215_6251265.1167010450185" References: <3D8E84095C6A524A985B787423094E40912580@mssmsx411> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_86215_6251265.1167010450185 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/24/06, Zakharov, Vasily M wrote: > > > Can't remember, I may be wrong. > > Well, what would be our policy on this point? > > If the documentation describes the parameter as "non-null", or null > value is clearly unacceptable for the method functionality, what should > we throw if null is passed, NullPointerException or > IllegalArgumentException? It depends on RI and spec as described in our exception thrown compatibility guideline. :-) Vasily > > > -----Original Message----- > From: nbeyer@gmail.com [mailto:nbeyer@gmail.com] On Behalf Of Nathan > Beyer > Sent: Sunday, December 24, 2006 5:42 AM > To: dev@harmony.apache.org > Subject: Re: Compatibility or non-bug question > > On 12/23/06, Zakharov, Vasily M wrote: > > > > I've read in some clever article :) that NPE is a way to react on > > un-predicted situation and it should never be thrown explicitly. And > > IAE, in contrary, is there exactly for explicit handling of incorrect > > argument situations. > > Can you provide an actual reference to this article? I'm not familiar > with any such guideline or design consideration. > > Regardless, there's nothing wrong explicitly throwing NPE. > > -Nathan > > > > > So if we need to check the argument and throw exception manually - it > > should be IAE with "argument is null" comment string, my vote. :) > > > > Vasily > > > > > > -----Original Message----- > > From: Alexei Zakharov [mailto:alexei.zakharov@gmail.com] > > Sent: Thursday, December 21, 2006 12:30 PM > > To: dev@harmony.apache.org > > Subject: Re: Compatibility or non-bug question > > > > > Why NPE and not IllegalArgumentException? > > > If doc says "non-null", the latter may also be appropriate... > > > > IMHO NullPointerException emphasizes the fact that argument was set to > > *null* value. However, I think IllegalArgumentException is also Ok. > > > > Thanks, > > > > 2006/12/20, Zakharov, Vasily M : > > > > > > Thanks Alexei! > > > > > > > IMHO it is ok to throw NullPointerException here and file > > Non-Bug-Diff > > > JIRA. > > > > > > Why NPE and not IllegalArgumentException? > > > If doc says "non-null", the latter may also be appropriate... > > > > > > Vasily > > > > > > > > > -----Original Message----- > > > From: Alexei Zakharov [mailto:alexei.zakharov@gmail.com] > > > Sent: Wednesday, December 20, 2006 4:57 PM > > > To: dev@harmony.apache.org > > > Subject: Re: Compatibility or non-bug question > > > > > > Hi, > > > > > > > http://issues.apache.org/jira/browse/HARMONY-1024 > > > > > > So RI allows creation of the Binding with null name. I don't see > much > > > sence in such object. How can it be used? For what? Moreover, we > have > > > a non-null spec requirement. So IMHO it is ok to throw > > > NullPointerException here and file Non-Bug-Diff JIRA. > > > > > > > http://issues.apache.org/jira/browse/HARMONY-2525 > > > > > > The same thing here. The only exception is that IMHO test3 from this > > > JIRA is valid. Why not to throw IndexOutOfBoundsException before > > > NullPointerException? > > > > > > Regards, > > > > > > > > > > > > > > > 2006/12/17, Zakharov, Vasily M : > > > > > > > > Well, that's better than nothing. :) > > > > > > > > In fact, those two bugs I've mentioned are the ones I'm most > > > interested > > > > in right now: > > > > > > > > http://issues.apache.org/jira/browse/HARMONY-1024 > > > > http://issues.apache.org/jira/browse/HARMONY-2525 > > > > > > > > What to you think we should do to them? > > > > > > > > Thank you. > > > > > > > > Vasily > > > > > > > > > > > > -----Original Message----- > > > > From: Alexey Petrenko [mailto:alexey.a.petrenko@gmail.com] > > > > Sent: Saturday, December 16, 2006 7:48 AM > > > > To: dev@harmony.apache.org > > > > Subject: Re: Compatibility or non-bug question > > > > > > > > We have a compatibility guideline [1]. > > > > And according this guideline we should discuss cases like yours > one > > by > > > > one. > > > > > > > > SY, Alexey > > > > > > > > [1] > http://harmony.apache.org/subcomponents/classlibrary/compat.html > > > > > > > > 2006/12/16, Zakharov, Vasily M : > > > > > Hi, all, > > > > > > > > > > I'm now trying to investigate and fix some trivial bugs, but I'm > > not > > > > > sure which way to fix them to. > > > > > > > > > > There're multiple situations where RI, say, doesn't throw > > exception > > > > and > > > > > Harmony does throw, and throwing an exception in that situation > > > looks > > > > > good and logical. > > > > > > > > > > In other words, the question is, what is a compatibility bug > (that > > > > needs > > > > > to be fixed to match RI) and what is a non-bug difference. > > > > > > > > > > Also, there's a question on non-bug differences. They're not > bugs, > > > but > > > > > what should we do to them? Just close them, if Harmony behaviour > > > seems > > > > > more correct than RI's? Or fix them to match RI though they're > not > > > > bugs, > > > > > to make sure we don't break existing applications? > > > > > > > > > > Here are two characteristic examples of uncertainties that occur > > > > rather > > > > > frequently: > > > > > http://issues.apache.org/jira/browse/HARMONY-1024 > > > > > http://issues.apache.org/jira/browse/HARMONY-2525 > > > > > > > > > > Do we have some, say, policy, or guideline on how issues like > > these > > > > > could (or should) be resolved? > > > > > > > > > > There're many issues like these, and having a general approach > > would > > > > > ease dealing with them... > > > > > > > > > > Any opinions? > > > > > > > > > > Thank you! > > > > > > -- > > Alexei Zakharov, > > Intel ESSD > > > -- Best regards, Andrew Zhang ------=_Part_86215_6251265.1167010450185--