Loading ConstraintValidators with service loader does not take into account externalClassLoader

Description

We should get rid of GetConstraintValidatorsFromServiceLoader and use GetInstancesFromServiceLoader instead.

Moreover, I think we can safely remove serviceLoaderBasedConstraintMappingContributor from ConfigurationImpl.

We can instantiate it in ValidatorFactoryImpl: it will be safer (we will need to pass the externalClassLoader to it and thus it will be possible to call getServiceLoaderBasedConstraintMappingContributor() before the call to externalClassLoader(...) which would be wrong) and we don't need to keep it around, once the initialization is done.

Environment

None

Activity

Fixed

Details

Assignee

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Guillaume Smet

Components

Fix versions

Priority

Created June 12, 2017 at 9:48 AM
Updated July 5, 2017 at 3:24 PM
Resolved July 5, 2017 at 1:17 PM

Flag notifications