[bv-dev] Cross parameter validation convergence

Hardy Ferentschik hardy at hibernate.org
Thu Sep 6 08:54:32 EDT 2012


On 6 Jan 2012, at 2:49 PM, Emmanuel Bernard wrote:

> On Mer 2012-09-05  9:51, Gunnar Morling wrote:
>>>> If we really want to add this to BV 1.1, IMO we should only add the
>>>> generic approach and let implementors experiment with the type-safe
>>>> one.
>>> 
>>> What is your reasoning for not wanting the type safe approach in?
>> 
>> It's just the number of open questions around this which I'm a bit
>> concerned about. For the other method validation things we could more or
>> less rely on the experiences from the existing implementations or added
>> smaller things like ParameterNameProvider.
>> 
>> Compared to that, there are several questions around (type-safe)
>> cross-parameter validation we'd be answering in the spec for the first
>> time. But it may be I'm just over-cautious here.
> 
> That is a legitimate fear but, I'd rather we give all that we've got and
> try to build the feature even if we decide to pull it out in the last
> month before the release.
> 
> My reasoning is that we will have see the option(s) we have for the
> future and won't cut us into a corner.

I still don't understand why we not just go for the generic approach and leave the type-safe 
approach out for now. This seems to me the safest alternative for me atm.

As we discussed only the generic approach allows for all possible cross parameter validation
scenarios. For this reason we want to add it either way. Why complicating things with adding
another approach with the risk of being too ambitious. 

--Hardy


More information about the beanvalidation-dev mailing list