We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sm
arthas-boot version: 3.6.2
version 3.6.2
Alpine Linux v3.14
step1
public interface RocketMQListener<T> { void onMessage(T message); }
step2
public class StringRocketMQListener implements RocketMQListener<String> { @Override public void onMessage(String s) { } }
step3
# https://arthas.aliyun.com/doc/sm.html sm StringRocketMQListener onMessage
输出了2个onMessage
onMessage
难道不是应该1个嘛?
The text was updated successfully, but these errors were encountered:
本质上底层是clazz.getDeclaredMethods()。方法的签名由方法的名称和参数类型决定。 当一个类继承自一个泛型接口或继承自一个带有泛型参数的类时,由于类型擦除的原因,编译器会在字节码中生成桥接方法以保持多态性。可以使用method.isBridge()判断是否桥接方法 上面的代码会有两个 onMessage 方法的签名,一个是接口中声明的 onMessage(T message),另一个是实际实现的 onMessage(String message)
官方文档参考:https://docs.oracle.com/javase/tutorial/java/generics/bridgeMethods.html
Sorry, something went wrong.
No branches or pull requests
环境信息
arthas-boot version: 3.6.2
version 3.6.2
Alpine Linux v3.14
重现问题的步骤
step1
step2
step3
期望的结果
输出了2个
onMessage
实际运行的结果
难道不是应该1个嘛?
The text was updated successfully, but these errors were encountered: