mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-22 02:58:05 +00:00
HHH-7747 check if the code attribute is null when building the StackMapTable
This commit is contained in:
parent
834bb03c96
commit
8b365d8ef5
@ -159,8 +159,11 @@ private void addGetFieldHandlerMethod(ClassFile classfile)
|
||||
code.addOpcode(Opcode.ARETURN);
|
||||
minfo.setCodeAttribute(code.toCodeAttribute());
|
||||
minfo.setAccessFlags(AccessFlag.PUBLIC);
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
minfo.getCodeAttribute().setAttribute(smt);
|
||||
CodeAttribute codeAttribute = minfo.getCodeAttribute();
|
||||
if (codeAttribute != null) {
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
codeAttribute.setAttribute(smt);
|
||||
}
|
||||
classfile.addMethod(minfo);
|
||||
}
|
||||
|
||||
@ -185,8 +188,11 @@ private void addSetFieldHandlerMethod(ClassFile classfile)
|
||||
code.addOpcode(Opcode.RETURN);
|
||||
minfo.setCodeAttribute(code.toCodeAttribute());
|
||||
minfo.setAccessFlags(AccessFlag.PUBLIC);
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
minfo.getCodeAttribute().setAttribute(smt);
|
||||
CodeAttribute codeAttribute = minfo.getCodeAttribute();
|
||||
if (codeAttribute != null) {
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
codeAttribute.setAttribute(smt);
|
||||
}
|
||||
classfile.addMethod(minfo);
|
||||
}
|
||||
|
||||
@ -269,8 +275,11 @@ private void addReadMethod(ClassFile classfile, FieldInfo finfo)
|
||||
|
||||
minfo.setCodeAttribute(code.toCodeAttribute());
|
||||
minfo.setAccessFlags(AccessFlag.PUBLIC);
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
minfo.getCodeAttribute().setAttribute(smt);
|
||||
CodeAttribute codeAttribute = minfo.getCodeAttribute();
|
||||
if (codeAttribute != null) {
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
codeAttribute.setAttribute(smt);
|
||||
}
|
||||
classfile.addMethod(minfo);
|
||||
}
|
||||
|
||||
@ -337,8 +346,11 @@ private void addWriteMethod(ClassFile classfile, FieldInfo finfo)
|
||||
|
||||
minfo.setCodeAttribute(code.toCodeAttribute());
|
||||
minfo.setAccessFlags(AccessFlag.PUBLIC);
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
minfo.getCodeAttribute().setAttribute(smt);
|
||||
CodeAttribute codeAttribute = minfo.getCodeAttribute();
|
||||
if (codeAttribute != null) {
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
codeAttribute.setAttribute(smt);
|
||||
}
|
||||
classfile.addMethod(minfo);
|
||||
}
|
||||
|
||||
@ -364,9 +376,8 @@ private void transformInvokevirtualsIntoPutAndGetfields(ClassFile classfile)
|
||||
pos = transformInvokevirtualsIntoGetfields(classfile, iter, pos);
|
||||
pos = transformInvokevirtualsIntoPutfields(classfile, iter, pos);
|
||||
}
|
||||
|
||||
StackMapTable smt = MapMaker.make(classPool, minfo);
|
||||
minfo.getCodeAttribute().setAttribute(smt);
|
||||
codeAttr.setAttribute(smt);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user