raphw / byte-buddy

Runtime code generation for the Java virtual machine.
https://bytebuddy.net
Apache License 2.0
6.23k stars 804 forks source link

the new Version of AgentBuilder.Transformer.transform() can't support current application with byte-buddy of 1.10.21 #1551

Closed ljqseu closed 6 days ago

ljqseu commented 11 months ago

our applications use the byte-buddy of version 1.10.21, it has four parameters in the AgentBuilder.Transformer.transform(). However ,in the version 1.14.8, it has five parameters in the AgentBuilder.Transformer.transform(). The new parameter of ProtectionDomain is useless for us ,but the application have to restart to reload the new transform,which is very ugly for user.

so , can you reserve the transform method with four parameters in the new version ,which is very kind for the current application.thank you very much.

image

raphw commented 11 months ago

Not sure I follow? If you dynsmically reload your agent with a new version of Byte Buddy, why can't you reload the linked code?

ljqseu commented 11 months ago

已收到阁下邮件,谢谢!                                   刘家强                    

ljqseu commented 11 months ago

in our program ,the linked code is reload into bootstrap classloader .When reload the agent ,it will use last transform method, not the new one. Could you please add Transformer.transform() with four paramenters in the new version.

raphw commented 11 months ago

No, the method is part of a functional interface.

By adding Byte Buddy to the boot loader, it's not updateable anyways, though

ljqseu commented 6 days ago

已收到阁下邮件,谢谢!                                   刘家强