On 21 Jan 2013, at 6:35 PM, Emmanuel Bernard <emmanuel(a)hibernate.org> wrote:
I think I like @CrossParametersConstraints more than @Constraint for
both as it makes things explicit and keep the simple use case as is.
+1 I like an explicit @CrossParametersConstraints also better than attributes on
@Constraint.
But I am intrigued by the @Validates option. In many ways, it's
similar
to how we resolve the right constraint validator based on the type. The
only difference is that the @Validates annotation refines how Object[]
should be interpreted. It "fits better" in my opinion.
I could live with this option as well.
My concern around the latest option is that it forces us to be a
subclass of ConstraintViolation for the foreseeable future including
you mean ConstraintValidator, right? I don't mind being tied to that,
especially since I never been a big fan of some of the type-safe approaches.
--Hardy