commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <phil.ste...@gmail.com>
Subject Re: svn commit: r545184 - /jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/PoissonDistributionImpl.java
Date Sun, 10 Jun 2007 21:40:03 GMT
On 6/7/07, Martin van den Bemt <mllist@mvdb.net> wrote:
> 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.

I would prefer throwing IllegalArgumentException to NPE in this case,
since there is no null dereference. I would also consider making this
a no-op (i.e., leave the NormalDistribution alone if null is passed to
this method).  I am fine leaving as is, however.

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message