Update ByteBuddy (#3254)

* Update ByteBuddy

* spotless
This commit is contained in:
Nikita Salnikov-Tarnovski 2021-06-11 15:12:38 +03:00 committed by GitHub
parent 6733b50a65
commit 31d3f2f8de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -53,7 +53,7 @@ val DEPENDENCY_SETS = listOf(
),
DependencySet(
"net.bytebuddy",
"1.10.18",
"1.11.2",
listOf("byte-buddy", "byte-buddy-agent")
),
DependencySet(

View File

@ -225,8 +225,9 @@ public class HelperInjector implements Transformer {
if (!target.canRead(helperModule)) {
log.debug("Adding module read from {} to {}", target, helperModule);
target.modify(
ClassInjector.UsingInstrumentation.redefineModule(
AgentInstaller.getInstrumentation(),
target,
Collections.singleton(helperModule),
Collections.emptyMap(),
Collections.emptyMap(),

View File

@ -100,6 +100,12 @@ public class AgentCachingPoolStrategy implements AgentBuilder.PoolStrategy {
return createCachingTypePool(loaderHash, loaderRef, classFileLocator);
}
@Override
public final TypePool typePool(
ClassFileLocator classFileLocator, ClassLoader classLoader, String name) {
return typePool(classFileLocator, classLoader);
}
private TypePool.CacheProvider createCacheProvider(
int loaderHash, WeakReference<ClassLoader> loaderRef) {
return new SharedResolutionCacheAdapter(loaderHash, loaderRef, sharedResolutionCache);