Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transforming record types #10052

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public ClassVisitor wrap(
int writerFlags,
int readerFlags) {

return new ClassVisitor(Opcodes.ASM7, classVisitor) {
return new ClassVisitor(Opcodes.ASM9, classVisitor) {
// We are using Object class name instead of fieldTypeName here because this gets
// injected onto the bootstrap class loader where context class may be unavailable
private final TypeDescription fieldType = TypeDescription.ForLoadedType.of(Object.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ public ClassVisitor wrap(
int writerFlags,
int readerFlags) {

return new ClassVisitor(Opcodes.ASM7, classVisitor) {
return new ClassVisitor(Opcodes.ASM9, classVisitor) {
@Override
public MethodVisitor visitMethod(
int access, String name, String descriptor, String signature, String[] exceptions) {
MethodVisitor mv = super.visitMethod(access, name, descriptor, signature, exceptions);
return new MethodVisitor(Opcodes.ASM7, mv) {
return new MethodVisitor(api, mv) {
/** The most recent objects pushed to the stack. */
private final Object[] stack = {null, null};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static Type underlyingType(Type type) {

ReferenceCollectingClassVisitor(
HelperClassPredicate helperClassPredicate, boolean isAdviceClass) {
super(Opcodes.ASM7);
super(Opcodes.ASM9);
this.helperClassPredicate = helperClassPredicate;
this.isAdviceClass = isAdviceClass;
}
Expand Down Expand Up @@ -312,7 +312,7 @@ private class AdviceReferenceMethodVisitor extends MethodVisitor {
private int currentLineNumber = -1;

public AdviceReferenceMethodVisitor(MethodVisitor methodVisitor) {
super(Opcodes.ASM7, methodVisitor);
super(Opcodes.ASM9, methodVisitor);
}

@Override
Expand Down Expand Up @@ -526,7 +526,7 @@ private class VirtualFieldCollectingMethodVisitor extends MethodVisitor {
private final EvictingQueue<Type> lastTwoClassConstants = EvictingQueue.create(2);

VirtualFieldCollectingMethodVisitor(MethodVisitor methodVisitor) {
super(Opcodes.ASM7, methodVisitor);
super(Opcodes.ASM9, methodVisitor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private static class GenerateMuzzleMethodsAndFields extends ClassVisitor {
private boolean generateVirtualFieldsMethod = true;

public GenerateMuzzleMethodsAndFields(ClassVisitor classVisitor, URLClassLoader classLoader) {
super(Opcodes.ASM7, classVisitor);
super(Opcodes.ASM9, classVisitor);
this.classLoader = classLoader;
}

Expand Down
Loading