Update datadog.trace.agent.tooling.bytebuddy.outline.TypeOutline to work with ByteBuddy 1.17.6 #9457
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
Fixes some of the methods in
datadog.trace.agent.tooling.bytebuddy.outline.TypeOutline
that stopped working with ByteBuddy 1.17.6 release.There is a chain of inheritance:
TypeOutline
-> ... ->WithDelegation
-> ... ->ModifierReviewable.AbstractBase
.Some of the methods (
isInterface
,isAnnotation
and others) used to be inherited byTypeOutline
fromModifierReviewable.AbstractBase
. The abstract base implementations relied ongetModifiers()
(overridden inTypeOutline
).This ByteBuddy commit overrides these methods in
WithDelegation
(so nowTypeOutline
inherits them from that class), and the new implementations delegate to what is returned bydelegate()
.delegate()
method is not implemented inTypeOutline
(it throws an exception), so with the introduction of the new methods things broke inTypeOutline
.This PR implements the affected methods in directly in
TypeOutline
. They rely ongetModifiers()
as before.Motivation
Additional Notes
This was uncovered when trying to bump dependencies in the Selenium instrumentation module. Selenium depends on ByteBuddy, so bumping
selenium-java
from 4.33.0 to 4.34.0 transitively pulled inbyte-buddy
1.17.6 instead of the previously used 1.17.5Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]