|
Jozef Hartinger the problem really is that the annotation copy in the subclasses like Weld does is going against the Java annotations inheritance spirit. Annotations are copied to subclasses if @Inherited is used. You will note that the inherited behavior is not the default. For good reason I believe. It is quite uncommon for annotations to use that behavior. Also note that the annotations eg decided not to even offer that option of method overriding.
I feel like explaining to the users that you are fixing something that is using dodgy behavior is acceptable. Any specific extension or framework you are thinking about that use that behavior? The only examples I have in mind are people having to workaround that behavior 
The reason we do not allow @Valid twice in a hierarchy is not really about weakening the return type constraints. They actually can be strengthened. It's about a clash that could arise if used in conjunction with another feature (group conversion). Group conversion in only defined where @Valid is and having two definitions of group conversion can break the Liskov substitution principles.
|