Consider offering a generic SPI to relax method constraint inheritance rules

Description

Weld copies the annotations of the class it proxies for some reason unknown to me.
This causes Bean Validation's rules to fail as subclasses are restricted in what they can override wrt constraints and cascading. It's simple Liskov substitution principe.

We could consider adding a spec SPI to exclude certain subclasses from these restriction rules. A weld proxy would be excluded by the implementation of that SPI.

I personally think that before doing this int he spec we should in decreasing priority:

1. Fix Weld not to copy annotations in subclasses
2. offer such an API in the Reference Implementation and not the spec per se.

Environment

None

Status

Assignee

Unassigned

Reporter

Emmanuel Bernard

Labels

None

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

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Priority

Major