Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 38537 invoked from network); 7 Jun 2007 21:18:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jun 2007 21:18:04 -0000 Received: (qmail 41621 invoked by uid 500); 7 Jun 2007 21:18:05 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 41561 invoked by uid 500); 7 Jun 2007 21:18:05 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 41545 invoked by uid 99); 7 Jun 2007 21:18:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2007 14:18:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [69.55.235.182] (HELO mvdb.net) (69.55.235.182) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 07 Jun 2007 14:18:00 -0700 Received: (qmail 17440 invoked from network); 7 Jun 2007 21:17:39 -0000 Received: from unknown (HELO [192.168.1.230]) (80.126.215.98) by 69.55.235.171 with SMTP; Thu, 07 Jun 2007 21:17:39 +0000 Message-ID: <466875FD.7050807@mvdb.net> Date: Thu, 07 Jun 2007 23:17:49 +0200 From: Martin van den Bemt User-Agent: Thunderbird 1.5.0.10 (X11/20070304) MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: svn commit: r545184 - /jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java References: <20070607135537.8BC1E1A981A@eris.apache.org> <466873D2.4080606@free.fr> In-Reply-To: <466873D2.4080606@free.fr> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org If the intention is to have a NullPointerException when null is passed, declare it and throw it specifically (that way you are in control of the exception). I think every undocumented nullpointer exception is a bug. Mvgr, Martin Luc Maisonobe wrote: > brentworden@apache.org wrote: > >> + /** >> + * Modify the normal distribution used to compute normal approximations. >> + * The caller is responsible for insuring the normal distribution has the >> + * proper parameter settings. >> + * @param value the new distribution >> + * @since 1.2 >> + */ >> + public void setNormal(NormalDistribution value) { >> + normal = value; >> } > > Should we check for null parameters here and throw a NPE ourselves or > simply allow null parameters and let the JVM throw the NPE when the > distribution is used ? > > I am fine with the current choice of letting the JVM handle this by > itself, I only wondered what others think about this. > > Luc > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org