Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 93746 invoked from network); 21 Aug 2002 23:31:56 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 21 Aug 2002 23:31:55 -0000 Received: (qmail 4642 invoked by uid 97); 21 Aug 2002 23:32:25 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 4626 invoked by uid 97); 21 Aug 2002 23:32:25 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 4612 invoked by uid 98); 21 Aug 2002 23:32:24 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) In-Reply-To: To: "Jakarta Commons Developers List" Subject: Re: [commons]NPE or IAE? MIME-Version: 1.0 X-Mailer: Lotus Notes Build V60_M14_08012002NP Release Candidate August 01, 2002 From: dion@multitask.com.au Message-ID: Date: Thu, 22 Aug 2002 09:47:55 +1000 X-MIMETrack: Serialize by Router on gateway/Multitask Consulting/AU(Release 5.0.8 |June 18, 2001) at 08/22/2002 09:47:59 AM, Serialize complete at 08/22/2002 09:47:59 AM Content-Type: multipart/alternative; boundary="=_alternative 0081416FCA256C1C_=" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --=_alternative 0081416FCA256C1C_= Content-Type: text/plain; charset="US-ASCII" ola.berg@arkitema.se wrote on 22/08/2002 06:23:17 AM: > A quickie. > > When contributing new code directly to Commons, would you like me to > use IllegalArgumentException for all illegal arguments to a method, > or NullPointerException for the illegal nulls? NPEs for the illegal nulls. From the JDK docs: Thrown when an application attempts to use null in a case where an object is required. These include: Calling the instance method of a null object. Accessing or modifying the field of a null object. Taking the length of null as if it were an array. Accessing or modifying the slots of null as if it were an array. Throwing null as if it were a Throwable value. Applications should throw instances of this class to indicate other illegal uses of the null object. > Preferences, anybody? [snip] -- dIon Gillard, Multitask Consulting Work: http://www.multitask.com.au Developers: http://adslgateway.multitask.com.au/developers --=_alternative 0081416FCA256C1C_=--