Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
BUG FIX - Validations (oops!)
Browse files Browse the repository at this point in the history
Change-Id: I9a920bc83e64327c20e22501756c2d2906b8d039
Signed-off-by: Matthias Steiner <matthias.steiner@inscope.net>
  • Loading branch information
steinermatt committed Oct 28, 2014
1 parent bebd213 commit 396095c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ void validateParam(Annotation[] annotations, Object param, String paramName) thr

ValidationError[] errors = ConstraintViolationMapper.convertConstraintViolationsToValidationErrors(constraints, locale, this.messageResourceBundleName);

throw new DataValidationException(errors);
// only throw data validation exception in case we found errors ;)
if (errors != null && errors.length > 0)
{
throw new DataValidationException(errors);
}
}
catch (ConstraintViolationException ex)
{
Expand Down

0 comments on commit 396095c

Please sign in to comment.