sofastack / sofa-ark

SOFAArk is a light-weight,java based classloader isolation framework.
https://www.sofastack.tech/projects/sofa-boot/sofa-ark-readme/
Apache License 2.0
1.57k stars 500 forks source link

asm api version error #726

Closed r67yfyt closed 1 year ago

r67yfyt commented 1 year ago

Describe the question or bug

"com.alipay.sofa.ark.tools.MainClassFinder.ClassDescriptor#ClassDescriptor" set "Opcodes.ASM4" however "if (nestHostClass != null) { classVisitor.visitNestHost(nestHostClass); }" and " public void visitNestHost(final String nestHost) { if (api < Opcodes.ASM7) { throw new UnsupportedOperationException("NestHost requires ASM7"); } if (cv != null) { cv.visitNestHost(nestHost); } } "

Expected behavior

set "Opcodes.ASM7"

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

yuanyuancin commented 1 year ago

业务类有何特点,导致走到了

if (nestHostClass != null) { classVisitor.visitNestHost(nestHostClass); }

r67yfyt commented 1 year ago

业务类有何特点,导致走到了

if (nestHostClass != null) { classVisitor.visitNestHost(nestHostClass); }

有内部类或者使用了内部类的

lvjing2 commented 1 year ago

@r67yfyt 欢迎提交 PR 哈,可以把你的本地修复方案让 @yuanyuancin Review 下,没问题的话就可以合并。