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( DependencySet(
"net.bytebuddy", "net.bytebuddy",
"1.10.18", "1.11.2",
listOf("byte-buddy", "byte-buddy-agent") listOf("byte-buddy", "byte-buddy-agent")
), ),
DependencySet( DependencySet(

View File

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

View File

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