|
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.
|