So, I may be missing the obvious, but if the method's precondition is that it
receives an int[], shouldn't you be doing input validation anyway?
if (userData instanceof int[] ((int[]) userData.length 0) {
return userData;
}
else {
getResponse().setStatus(Status.BAD_REQUEST);
}
Or are
Hi Jon,
In method 1, there is a need for input validation, as you say... but when
there is input provided and there are parse errors, the handler simply gets
a *null* argument and is not able to catch the exception.
In method 2, the exception describes the parse error---which I want to feed
back
2 matches
Mail list logo