Update ByteBuddy from 1.8.22 to 1.9.15
See original GitHub issueHi @raphw
I’m trying to update the ByteBuddy Version to 1.9.15 in Stagemonitor.
As mentioned in #470 the method asDecorator is removed but if i understand it right, there is no need to call asDecorator anymore. Problem, without calling asDecorator the instrumention doesn’t work anymore 😦.
private static ClassFileTransformer initByteBuddyClassFileTransformer(AutoEvictingCachingBinaryLocator binaryLocator) {
AgentBuilder agentBuilder = createAgentBuilder(binaryLocator);
for (StagemonitorByteBuddyTransformer transformer : getStagemonitorByteBuddyTransformers()) {
agentBuilder = agentBuilder
.type(transformer.getMatcher())
.transform(transformer.getTransformer())
.asDecorator();
}
final long start = System.currentTimeMillis();
try {
return agentBuilder.installOn(instrumentation);
} finally {
if (corePlugin.isDebugInstrumentation()) {
logger.info("Installed agent in {} ms", System.currentTimeMillis() - start);
}
}
}
As i’m a absoulte newbie on BuddyBuddy and not find the right information in the documentation and now i hope you can give me an advice?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Byte Buddy - runtime code generation for the Java virtual ...
I'm your Byte Buddy! Byte Buddy is a code generation and manipulation library for creating and modifying Java classes during the runtime of...
Read more >byte-buddy-gradle-plugin 1.9.15 javadoc (net.bytebuddy) - javadoc.io
A class loader resolver for creating class loaders for given class paths. Initialization. Defines an entry point for a Byte Buddy transformation in...
Read more >byte-buddy: 同步https://github.com/raphw/byte-buddy - Gitee
Byte Buddy is a code generation and manipulation library for creating and modifying Java classes during the runtime of a Java application and...
Read more >artifact listener › net.bytebuddy:byte-buddy
Version, Last update, Links ... 1.9.15, 21/07/2019. 1.9.14, 08/07/2019. 1.9.13, 25/05/2019. 1.9.12, 26/03/2019 ... 1.8.22, 08/09/2018. 1.8.21, 02/09/2018.
Read more >Adicionar extensões (XWiki.AddExtensions) - CNJ
Byte Buddy is a Java library for creating Java classes at run time. This artifact is a build of Byte Buddy with all...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Alright, I found the problem. I (unintentionally) reversed the transformer application order in Byte Buddy 1.9.0. I do not want to undo this now, 1.9.0 has been around for a while. I will now also add a test for retaining this application order.
If you reverse the order in the comparator in
AgentAttacher(line 287) while updating to 1.9.*, everything should work as expected.It’s probably a small thing, I can have a look tomorrow!