coheigea commented on PR #3651:
URL: https://github.com/apache/cxf/pull/3651#issuecomment-6499984635
Thanks Freeman, both confirmed and fixed, with regression tests for each.
1. Inherited class-level @Scopes. A class-level @Scopes is now replaced by a
method-level @Scopes declared on the same class or interface, or on any
subclass of it. So Sub.foo() and Sub2.foo() both need only admin. While
checking this I found the override variant of the same pattern (a base class
with class-level read, and a subclass overriding one of its methods with
@Scopes("admin")) and fixed that too, together with the equivalent interface
case. Method-level @Scopes are still never replaced, so an override can add to
its parent’s method-level scopes but can’t weaken them.
2. Unrelated overloads linked to the bridge. I’ve dropped the bridge-based
matching. The generic parameter types of superclass and interface methods are
now resolved against the class’s type arguments, via a new
ReflectionUtil.getGenericallyOverriddenMethods, and only an exact match is
linked. update(Integer) keeps only its own read, and update(String) still
requires the interface’s admin. It also works through intermediate generic
classes and for implementations inherited from a superclass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]