fix spring aop generated classes major version is 46, do not support ldc class problem. #1223

This commit is contained in:
hengyunabc 2020-06-01 17:27:41 +08:00
parent c59fa48229
commit 25c5fb7e7b

View File

@ -300,6 +300,11 @@ public class Enhancer implements ClassFileTransformer {
affect.addMethodAndCount(inClassLoader, className, methodNode.name, methodNode.desc); affect.addMethodAndCount(inClassLoader, className, methodNode.name, methodNode.desc);
} }
// https://github.com/alibaba/arthas/issues/1223
if (classNode.version < Opcodes.V1_5) {
classNode.version = Opcodes.V1_5;
}
byte[] enhanceClassByteArray = AsmUtils.toBytes(classNode, inClassLoader); byte[] enhanceClassByteArray = AsmUtils.toBytes(classNode, inClassLoader);
// 增强成功记录类 // 增强成功记录类