Avoid creating a full ValidatorFactory to bootstrap the CDI extension

Description

Currently, to bootstrap the CDI extension, we have to bootstrap the whole ValidatorFactory which can lead to some issues as, at this time, beans are not yet available.

The ParameterNameProvider trick (i.e. provide the default one instead of an injected one) does not work for the ConstraintValidatorFactory as initializing the ConstraintValidators from the default one might not work.

This is typically the case in ManagedObjectsTest.

I'm starting to think that we will need a lightweight bootstrap process that is able to collect the validated classes/methods/fields and not do anything else.

That could be useful for other purposes.

Environment

None

Assignee

Unassigned

Reporter

Guillaume Smet

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

Major