[bv-dev] Ordered Validation (practically)

Hardy Ferentschik hardy at hibernate.org
Sun Jan 8 04:16:53 EST 2012


I am not so sure whether such a contract would be such a good idea. If we want to hold on to
the byte code or annotation processor idea (if the latter is even possible), such a contract would 
make sense.

However, that excludes imo the explicit configuration of order, either via  Emmanuel's 
@GroupSequence.ordering=PER_TARGET or via a simple order property in the constraint itself.

As a user of BV I think I would rather prefer to directly see and hence be able to infer the order.
And just imagine different  compilers actually do have different orders. That would be a total mess.

--Hardy


On Jan 7, 2012, at 9:40 PM, Matt Benson wrote:

> On Sat, Jan 7, 2012 at 6:27 AM, Gunnar Morling
> <gunnar.morling at googlemail.com> wrote:
>> One idea might be to introduce some kind of "validation order
>> provider" contract (similar to the parameter name provider we
>> discussed recently) with a reasonable default implementation.
>> 
>> BV providers could then come up with custom implementations based on
>> byte code order, meta data pre-generated by an annotation processor
>> etc. as they like which we still might spec later on if they proved
>> useful.
> 
> This sounds like a good compromise to transfer the responsibility from
> the spec to the implementations for doing crazy things like reading
> bytecode... so this would be a new collaborator managed for/by the
> ValidatorFactory?




More information about the beanvalidation-dev mailing list