I am puzzled by the javax.validation API. I am writing a simple test to understand it:
Sample sample = new Sample(); Set>
You can work around this like so:
throw new ConstraintViolationException( new HashSet>(violations));
You may be interested in tracking BVAL-198 which addresses this issue.