|
Description:
|
For intercepted classes without interfaces Weld generates and injects proxy classes, which are derived from the original class. In this case the original as well as the proxied sub-class have (identical) parameter constraints. This causes validation to fail as an apparent strengething of preconditions is detected.
Possible approaches:
- Ignore proxy classes when doing the precondition strengthening check. Would have to be based on heuristics (class name pattern, implemented interface etc.) since we don't know the exact proxy technology used)
- Check whether the constraints on overridden an overriding methods are the same. In this case there is no strenghtening, making the addition of constraints in the subtype acceptable.
|