Re: [maven-scm] Argument validation in maven-scm

2009-05-09 Thread Jason van Zyl
On 9-May-09, at 6:10 AM, Mark Struberg wrote: Hi! In maven-scm, I saw a lot of if (blablubParameter == null { throw new NullPointerException("blablubParameter must not be null!") } Shouldn't we use commons.lang.Validate -1 Validate.notNull(blablubParameter, "blablubParameter must not

Re: [maven-scm] Argument validation in maven-scm

2009-05-09 Thread Mark Struberg
> -0, to pull in another dependency just for something that is trivial to > code by hand. We could also add the small validation class I already wrote for JGit [1]. We could easily put them into plexus-utils which we already use excessively. Licensed under ASL for sure. LieGrue, strub [1] http

Re: [maven-scm] Argument validation in maven-scm

2009-05-09 Thread Benjamin Bentmann
Mark Struberg wrote: Shouldn't we use commons.lang.Validate Validate.notNull(blablubParameter, "blablubParameter must not be null!"); or at least throw InvalidArgumentExceptions instead of NPE? +1, to throw IAE instead of NPEs. The former one gives a clearer indication which party (client v

[maven-scm] Argument validation in maven-scm

2009-05-09 Thread Mark Struberg
Hi! In maven-scm, I saw a lot of if (blablubParameter == null { throw new NullPointerException("blablubParameter must not be null!") } Shouldn't we use commons.lang.Validate Validate.notNull(blablubParameter, "blablubParameter must not be null!"); or at least throw InvalidArgumentExceptio