HHH-10642 - [enhancer] Use INVOKEVIRTUAL instead of INVOKESPECIAL
(cherry picked from commit d95cecd91b
)
This commit is contained in:
parent
2ae61a3e33
commit
c43ba563da
|
@ -512,12 +512,12 @@ public class PersistentAttributesEnhancer extends Enhancer {
|
||||||
|
|
||||||
if ( op == Opcode.GETFIELD ) {
|
if ( op == Opcode.GETFIELD ) {
|
||||||
final int methodIndex = MethodWriter.addMethod( constPool, attributeMethods.getReader() );
|
final int methodIndex = MethodWriter.addMethod( constPool, attributeMethods.getReader() );
|
||||||
itr.writeByte( Opcode.INVOKESPECIAL, index );
|
itr.writeByte( Opcode.INVOKEVIRTUAL, index );
|
||||||
itr.write16bit( methodIndex, index + 1 );
|
itr.write16bit( methodIndex, index + 1 );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final int methodIndex = MethodWriter.addMethod( constPool, attributeMethods.getWriter() );
|
final int methodIndex = MethodWriter.addMethod( constPool, attributeMethods.getWriter() );
|
||||||
itr.writeByte( Opcode.INVOKESPECIAL, index );
|
itr.writeByte( Opcode.INVOKEVIRTUAL, index );
|
||||||
itr.write16bit( methodIndex, index + 1 );
|
itr.write16bit( methodIndex, index + 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue