Skip to content
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

Uncomment and fix JAX-RS default method tests #2930

Merged
merged 3 commits into from
May 11, 2021
Merged

Uncomment and fix JAX-RS default method tests #2930

merged 3 commits into from
May 11, 2021

Conversation

trask
Copy link
Member

@trask trask commented May 8, 2021

No description provided.

@@ -36,8 +35,7 @@

public static ElementMatcher.Junction<TypeDescription> safeHasSuperType(
ElementMatcher<TypeDescription> matcher) {
return not(isInterface())
.and(new SafeHasSuperTypeMatcher(new SafeErasureMatcher<>(matcher), false));
return new SafeHasSuperTypeMatcher(new SafeErasureMatcher<>(matcher), false);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change, interface default methods are not instrumented. I looked through the callers and changed some of them to extendsClass(), and the remaining seem more correct taking interface default methods in to account.

@@ -25,8 +25,7 @@

public static ElementMatcher.Junction<TypeDescription> implementsInterface(
ElementMatcher<TypeDescription> matcher) {
return not(isInterface())
.and(new SafeHasSuperTypeMatcher(new SafeErasureMatcher<>(matcher), true));
return new SafeHasSuperTypeMatcher(new SafeErasureMatcher<>(matcher), true);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change was not needed for JAX-RS default methods, but I looked through callers and not sure why we wouldn't also want to instrument interface default methods, so removed not(isInterface()) here too

@trask trask marked this pull request as ready for review May 9, 2021 02:05
@iNikem
Copy link
Contributor

iNikem commented May 11, 2021

@trask please rebase

@trask trask merged commit 8379404 into open-telemetry:main May 11, 2021
@trask trask deleted the jaxrs-default-method-tests branch May 11, 2021 18:22
@trask trask mentioned this pull request May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants