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

Activity

Show:

Details

Assignee

Reporter

Participants

Guillaume Smet

Components

Fix versions

Priority

Created December 10, 2018 at 7:34 PM
Updated December 19, 2018 at 7:33 PM