Hi

Those have less value for me. I implemented the checks for 3 reasons.

(1) to disambiguate the cases where we throw multiple exceptions in the
same spot for different arguments
(2) to display the index in IndexOutOfBoundsException, because knowing
what the index value was is often enough to pin-point a bug.
(3) collections code get used __a lot__ so I see more exceptions coming
from there.

The stuff in wtk/ is less interesting to me because it doesn't match any
of these criteria.
Generally the exception throwing sites are single-case, or they're in
weird out of the way places where exceptions are not likely to happen much.

-- Noel.

Sandro Martini wrote:
> Hi Noel,
> great job.
>
> What do you think on add also a method like
>
> public static void notEmpty(String fieldName, Object field) {
>
> in CollectionArgChecks ?
>
>
> And for many WTK Checks, a notNegative(...) and maybe another handling
> also the -1 case ?
>
>
> Comments ?
>
> Bye
>   

Reply via email to