Do not use validation provider resolver when provider is explicitly given

Description

When bootstrapping Bean Validation via Validation#byProvider(Class<?> provider), still the provider resolver is used to find a registered provider which is assignment compatible with the given class. I'm wondering why this is, can't we just instantiate the given provider type?

The current behavior requires a custom resolver in OSGi, also when explicitly bootstrapping Hibernate Validator, i.e. we already have the right provider class and don't need to find it anymore.

Environment

None

Assignee

Unassigned

Reporter

Gunnar Morling

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Blocker
Configure