Moreover, I have a question. Why ParallelMethodsMustNotDefineParameterConstraints#apply check only hasParameterConstraints but OverridingMethodMustNotAlterParameterConstraints#apply succeeded if isEquallyParameterConstrained. By Bean Validation spec rule
In sub types (be it sub classes/interfaces or interface implementations), no parameter constraints may be declared on overridden or implemented methods, nor may parameters be marked for cascaded validation.
Although of course on the other equally constrained parameter does not violate LSP
a method's preconditions (as represented by parameter constraints) must not be strengthened in sub types
So why does OverridingMethodMustNotAlterParameterConstraints take into account the equally of parameter constraints, but ParallelMethodsMustNotDefineParameterConstraints is not? |