Annotation Processor doesn't detect errors in parameter constraints in inheritance hierarchies

Description

In general, subclasses should not define constraints on method parameters that are stricter than those defined in superclasses. There was a detailed discussion on that in HV-421.

For instance, In Spring, with validation enabled, if I have two classes like this:

... I get a ConstraintDefinitionException on the first invocation of B.foo and rightly so.

I think the annotation processor should be able to detect this (and other cases cases mentioned in HV-421) at compile time. It doesn't seem to do that.

Environment

None

Status

Assignee

Marko Bekhta

Reporter

AlinaM

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

Yes, likely

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure