-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
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
Ensure that netty 4.0 instrumentation is not applied to 4.1 #4626
Conversation
named("doConnect").and(takesArgument(0, SocketAddress.class)), | ||
named("doConnect") | ||
.and(takesArgument(0, SocketAddress.class)) | ||
.and(returns(named("io.netty.channel.ChannelFuture"))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In netty 4.1 this method returns void
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you try adding testInstrumentation
dependencies also, to cross-test the netty instrumentations against each other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
assertThat(references).containsKey("muzzle.TestClasses$MethodBodyAdvice$SomeImplementation"); | ||
assertMethod( | ||
references.get("muzzle.TestClasses$MethodBodyAdvice$SomeImplementation"), | ||
"someMethod", | ||
"()V", | ||
PROTECTED_OR_HIGHER, | ||
OwnershipFlag.NON_STATIC); | ||
assertThat(references).containsKey("muzzle.TestClasses$MethodBodyAdvice$B"); | ||
assertMethod( | ||
references.get("muzzle.TestClasses$MethodBodyAdvice$B"), | ||
"staticMethod", | ||
"()V", | ||
PROTECTED_OR_HIGHER, | ||
OwnershipFlag.STATIC); | ||
assertThat(references).containsKey("muzzle.TestClasses$MethodBodyAdvice$A"); | ||
assertMethod( | ||
references.get("muzzle.TestClasses$MethodBodyAdvice$A"), | ||
"<init>", | ||
"()V", | ||
PROTECTED_OR_HIGHER, | ||
OwnershipFlag.NON_STATIC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
if (handle.getTag() == Opcodes.H_INVOKEVIRTUAL | ||
|| handle.getTag() == Opcodes.H_INVOKESTATIC | ||
|| handle.getTag() == Opcodes.H_INVOKESPECIAL | ||
|| handle.getTag() == Opcodes.H_NEWINVOKESPECIAL | ||
|| handle.getTag() == Opcodes.H_INVOKEINTERFACE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
…emetry#4626) * Enusre that netty 4.0 instrumentation is not applied to 4.1 * formatting * cross test netty instrumentation
Hopefully resolves #4612
Not completely sure how the linked issue happened, perhaps there are netty jars from different versions on the classpath, perhaps something else. This pr adds checking of method references to muzzle so that usages like
AttributeKey::new
would also be verified.