Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自动更新目标类字节码的 major version #24

Closed
hengyunabc opened this issue Jan 4, 2023 · 0 comments
Closed

自动更新目标类字节码的 major version #24

hengyunabc opened this issue Jan 4, 2023 · 0 comments
Milestone

Comments

@hengyunabc
Copy link
Collaborator

用户在编写 @Instrument 类的代码时,可能使用高版本的语法,编译生成的字节码也是高版本的。

那么就会导致增强应用的类时,在低版本的字节码里插入了高版本的字节码,jvm会校验失败。

所以,考虑下面的解决办法:

  • 自动把应用类的 字节码的 major version 更新为 @Instrument 类的 major version

这种情况下,有可能jvm本身版本比较低。比如 jvm版本是 jdk6,@Instrument 类的字节码版本是 jdk8的。这时@Instrument 类应该不生效。

参考: #16

@hengyunabc hengyunabc added this to the 0.0.8 milestone Jan 4, 2023
hengyunabc added a commit that referenced this issue Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant