HHH-13833 Replace references to Opcodes.ASM7 with OpenedClassReader.ASM_API

This commit is contained in:
Sanne Grinovero 2020-01-30 09:02:43 +00:00
parent 3eb49972f3
commit f7aba3ea17
3 changed files with 6 additions and 3 deletions

View File

@ -18,6 +18,7 @@ import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import net.bytebuddy.utility.OpenedClassReader;
import org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.AnnotatedFieldDescription;
import org.hibernate.bytecode.enhance.spi.EnhancementException;
import org.hibernate.bytecode.enhance.spi.EnhancerConstants;
@ -296,7 +297,7 @@ final class BiDirectionalAssociationHandler implements Implementation {
@Override
public Size apply(
MethodVisitor methodVisitor, Context implementationContext, MethodDescription instrumentedMethod) {
return delegate.apply( new MethodVisitor( Opcodes.ASM7, methodVisitor ) {
return delegate.apply( new MethodVisitor( OpenedClassReader.ASM_API, methodVisitor ) {
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {

View File

@ -11,6 +11,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
import javax.persistence.Id;
import net.bytebuddy.utility.OpenedClassReader;
import org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.AnnotatedFieldDescription;
import org.hibernate.bytecode.enhance.spi.EnhancementException;
import org.hibernate.bytecode.enhance.spi.EnhancerConstants;
@ -54,7 +55,7 @@ final class FieldAccessEnhancer implements AsmVisitorWrapper.ForDeclaredMethods.
TypePool typePool,
int writerFlags,
int readerFlags) {
return new MethodVisitor( Opcodes.ASM7, methodVisitor ) {
return new MethodVisitor( OpenedClassReader.ASM_API, methodVisitor ) {
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
if ( opcode != Opcodes.GETFIELD && opcode != Opcodes.PUTFIELD ) {

View File

@ -18,6 +18,7 @@ import java.util.Objects;
import javax.persistence.Embedded;
import net.bytebuddy.utility.OpenedClassReader;
import org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.AnnotatedFieldDescription;
import org.hibernate.bytecode.enhance.spi.EnhancerConstants;
import org.hibernate.engine.spi.CompositeOwner;
@ -134,7 +135,7 @@ final class PersistentAttributeTransformer implements AsmVisitorWrapper.ForDecla
TypePool typePool,
int writerFlags,
int readerFlags) {
return new MethodVisitor( Opcodes.ASM7, methodVisitor ) {
return new MethodVisitor( OpenedClassReader.ASM_API, methodVisitor ) {
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
if ( isEnhanced( owner, name, desc ) ) {