You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.
javax.validation.ConstraintDeclarationException: Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints.
So this will cause the exception above:
public class A {
public void method(Object arg) {...}
}
public class B extends A {
@Override
public void method(@NotNull Object arg) {...}
}
The text was updated successfully, but these errors were encountered:
HV000151: A method overriding another method must not alter the parameter constraint configuration, but method public void org.uniknow.agiledev.tutorial.dbc.OverrideClass.method(java.lang.Object) changes the configuration of public void org.uniknow.agiledev.tutorial.dbc.BaseClass.method(java.lang.Object).
Quote:
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. This would pose a strengthening of preconditions to be fulfilled by the caller.
javax.validation.ConstraintDeclarationException: Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints.
So this will cause the exception above:
The text was updated successfully, but these errors were encountered: