Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 97047 invoked from network); 4 Mar 2011 23:33:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Mar 2011 23:33:30 -0000 Received: (qmail 32043 invoked by uid 500); 4 Mar 2011 23:33:29 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 31915 invoked by uid 500); 4 Mar 2011 23:33:29 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 31906 invoked by uid 99); 4 Mar 2011 23:33:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 23:33:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [193.74.71.27] (HELO eir.is.scarlet.be) (193.74.71.27) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 23:33:23 +0000 Received: from mail.harfang.homelinux.org (ip-62-235-223-183.dsl.scarlet.be [62.235.223.183]) by eir.is.scarlet.be (8.14.2/8.14.2) with ESMTP id p24NWwj1015271 for ; Sat, 5 Mar 2011 00:32:59 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1299281579; bh=CLdJLAQ0ppc3nV1sJjGOLZbYNQL3Q33CxYwhbN563oA=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=G/NauPEiWd2ZEOGEn7BBeclu3oMDfN03iTL3oYISaPLCMgWEZVaMjcZvuF4XZonhp DAH1HFmUpCOlat9w7imjMn5UVYfwTktkQMglfX9DvFF4wkmdHrOclgKzwacdHwNU95 RqRSXkXi4rbVeUD2VkvV2MZswaemHLE5jh3j1AFo= Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 9D54761CE9 for ; Sat, 5 Mar 2011 00:32:55 +0100 (CET) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id OiVbKwL7XRoO for ; Sat, 5 Mar 2011 00:32:53 +0100 (CET) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 1F03A617B2 for ; Sat, 5 Mar 2011 00:32:53 +0100 (CET) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.72) (envelope-from ) id 1PveUO-000627-Sz for dev@commons.apache.org; Sat, 05 Mar 2011 00:32:52 +0100 Date: Sat, 5 Mar 2011 00:32:51 +0100 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [Math - 403] Never propagate a "NullPointerException" resulting from bad usage of the API Message-ID: <20110304233251.GN22170@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <4D6E46FB.80608@free.fr> <20110302230832.GJ22170@dusk.harfang.homelinux.org> <4D6F7512.5070308@free.fr> <20110303153446.GQ22814@dusk.harfang.homelinux.org> <4D6FBC10.1030703@free.fr> <20110303225116.GK22170@dusk.harfang.homelinux.org> <4D70C67A.9070808@free.fr> <20110304125544.GL22170@dusk.harfang.homelinux.org> <4D71097C.8070405@free.fr> <4D713E95.6050209@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D713E95.6050209@gmail.com> X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.20 (2009-06-14) X-DCC-scarlet.be-Metrics: eir 20001; Body=1 Fuz1=1 Fuz2=1 Hi. > Just want to throw another idea into the mix. How about stripping all the validation argument validation lines and putting in separate validator classes. Clients would call the validator on the arguments for the class before passing the arguments to the class's method. It makes the core classes more focused and efficient and enables clients to wrap method invocations with aspects that apply the validation routine. Could you post a little code example? Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org