We're updating the issue view to help you get more done. 

Implement optional relaxation of parameter validation consistent with Section 4.5.5

Description

Section 4.5.5 of Validation Specification V 1.1 allows that "providers may implement alternative, potentially more liberal, approaches for handling constrained methods in inheritance hierarchies". By default, an implementation must throw a ConstraintDefinitionException when a parameter constraint is defined on an overriding method.
The requested feature would implement a property to allow for relaxation of this requirement in two modes. The first mode would simply relax the requirement entirely, i.e. constraints may be defined on overriding methods without limit. The second mode would allow constraints on overriding methods to re-define existing constraints on the overridden method. For example:

1 2 3 public class A { public abstract int m(@NotNull Integer x){...} }
1 2 3 public class B extends A { public int m(@NotNull(groups={GroupOne.class}) {...} }

The second mode preserves some indication in code that a constraint violation may occur.

Environment

None

Status

Assignee

Unassigned

Reporter

Chris Beckey

Labels

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

5.1.0.Final

Priority

Minor