emmanuelbernard/beanvalidation-spec — comment on commit 1bae86b6abef67b1440749767557b4b2b49caba4
File: specbook/en/modules/constraint-declaration-validation.xml line 1091
By gunnarmorling:

> Add that a provider implementation must wrap calls to `ParameterNameProvider` and wrap it into a `ValidationException`.

While thinking about it, I'm coming to the conclusion that the throws declarations here don't make sense. As you say not the provider implementation but the engine will throw a `ValidationException`.

> By the way does the spec mark other contracts like that as supposed to return a `ValidationException`? At least `TraversableResolver`, `ConstraintValidator` etc do not in their JavaDoc (not sure about the spec)

I think `ValidationException` is mentioned where it's actually thrown by the runtime (`Validator`, `ValidatorFactory`). I think at least `ConstraintValidator` falls into the same category as `ParameterNameProvider` and typically doesn't throw it (but other exceptions).