wu-sheng commented on a change in pull request #1875: Correct overriding parent
class methods,when method parameters have annotations.More details to see the
issue #1740
URL:
https://github.com/apache/incubator-skywalking/pull/1875#discussion_r230547390
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/interceptor/enhance/ClassEnhancePluginDefine.java
##########
@@ -201,24 +204,26 @@
for (StaticMethodsInterceptPoint staticMethodsInterceptPoint :
staticMethodsInterceptPoints) {
String interceptor =
staticMethodsInterceptPoint.getMethodsInterceptor();
if (StringUtil.isEmpty(interceptor)) {
- throw new EnhanceException("no StaticMethodsAroundInterceptor
define to enhance class " + enhanceOriginClassName);
+ throw new EnhanceException("no StaticMethodsAroundInterceptor
define to enhance class " + typeDescription.getTypeName());
}
if (staticMethodsInterceptPoint.isOverrideArgs()) {
- newClassBuilder =
newClassBuilder.method(isStatic().and(staticMethodsInterceptPoint.getMethodsMatcher()))
- .intercept(
- MethodDelegation.withDefaultConfiguration()
- .withBinders(
- Morph.Binder.install(OverrideCallable.class)
- )
- .to(new
StaticMethodsInterWithOverrideArgs(interceptor))
- );
+ newClassBuilder =
newClassBuilder.method(not(isDeclaredBy(typeDescription))
Review comment:
Not declear by? Is this right?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services