we upgraded from HV 4.x to HV 5.4.2 and now when we have interface like following
@NotNull
List<AccountInfo> getMultiClientAccountBalances(@NotNull ClientContext clientContext, @NotNull Optional<AccountFilter> accountFilter);
I'm getting error:
javax.validation.UnexpectedTypeException: HV000186: The constraint of type 'javax.validation.constraints.NotNull' defined on 'getMultiClientAccountBalances.arg1' has multiple matching constraint validators which is due to an additional value handler of type 'org.hibernate.validator.internal.engine.valuehandling.OptionalValueUnwrapper'. It is unclear which value needs validating. Clarify configuration via @UnwrapValidatedValue.
I know it can be fixed by adding @UnwrapValidatedValue
to the field, but this must be added to every method what is a lot of work for me. Is there any simpler solution (besides upgrade to HV6.x)