-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
ValidatorSupport.getValidators()
should return a List<Validator<? super T>>
instead of List<Validator<T>>
, because PECS.
(Picture courtesy: Andrey Tyukin CC-BY-SA)
For instance, if MyEntity implements HasFoo
and FooValidator implements Validator<HasFoo>
, then MyEntityService
can implement getValidators()
as:
public List<Validator<? super MyEntity>> getValidators() {
return List.of(new FooValidator());
}
(which makes sense because FooValidator
is able to validate any Foo, including my entity)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working