HHH-16459 Fix inline dirty checking with generics and inheritance
This commit is contained in:
parent
634d590e72
commit
a69dec8ecf
|
@ -270,7 +270,7 @@ final class PersistentAttributeTransformer implements AsmVisitorWrapper.ForDecla
|
||||||
TypeDescription.VOID,
|
TypeDescription.VOID,
|
||||||
Visibility.PUBLIC
|
Visibility.PUBLIC
|
||||||
)
|
)
|
||||||
.withParameters( enhancedField.getType().asErasure() )
|
.withParameters( enhancedField.asDefined().getType().asErasure() )
|
||||||
.intercept( fieldWriter( enhancedField ) );
|
.intercept( fieldWriter( enhancedField ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,12 +396,12 @@ final class PersistentAttributeTransformer implements AsmVisitorWrapper.ForDecla
|
||||||
MethodDescription instrumentedMethod
|
MethodDescription instrumentedMethod
|
||||||
) {
|
) {
|
||||||
methodVisitor.visitVarInsn( Opcodes.ALOAD, 0 );
|
methodVisitor.visitVarInsn( Opcodes.ALOAD, 0 );
|
||||||
methodVisitor.visitVarInsn( Type.getType( persistentField.getType().asErasure().getDescriptor() ).getOpcode( Opcodes.ILOAD ), 1 );
|
methodVisitor.visitVarInsn( Type.getType( persistentField.asDefined().getType().asErasure().getDescriptor() ).getOpcode( Opcodes.ILOAD ), 1 );
|
||||||
methodVisitor.visitMethodInsn(
|
methodVisitor.visitMethodInsn(
|
||||||
Opcodes.INVOKESPECIAL,
|
Opcodes.INVOKESPECIAL,
|
||||||
managedCtClass.getSuperClass().asErasure().getInternalName(),
|
managedCtClass.getSuperClass().asErasure().getInternalName(),
|
||||||
EnhancerConstants.PERSISTENT_FIELD_WRITER_PREFIX + persistentField.getName(),
|
EnhancerConstants.PERSISTENT_FIELD_WRITER_PREFIX + persistentField.getName(),
|
||||||
Type.getMethodDescriptor( Type.getType( void.class ), Type.getType( persistentField.getType().asErasure().getDescriptor() ) ),
|
Type.getMethodDescriptor( Type.getType( void.class ), Type.getType( persistentField.asDefined().getType().asErasure().getDescriptor() ) ),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
methodVisitor.visitInsn( Opcodes.RETURN );
|
methodVisitor.visitInsn( Opcodes.RETURN );
|
||||||
|
|
Loading…
Reference in New Issue