Skip to content

Commit

Permalink
Use Gizmo.ASM_API_VERSION consistently in RESTEasy Reactive
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Mar 5, 2021
1 parent 3f2a40a commit c3458c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.objectweb.asm.Type;

import io.quarkus.deployment.util.AsmUtil;
import io.quarkus.gizmo.Gizmo;

public class ClassInjectorTransformer implements BiFunction<String, ClassVisitor, ClassVisitor> {

Expand Down Expand Up @@ -67,7 +68,7 @@ public ClassInjectorTransformer(Map<FieldInfo, ServerIndexedParameter> fieldExtr

@Override
public ClassVisitor apply(String classname, ClassVisitor visitor) {
return new ClassInjectorVisitor(Opcodes.ASM8, visitor, fieldExtractors, superTypeIsInjectable);
return new ClassInjectorVisitor(Gizmo.ASM_API_VERSION, visitor, fieldExtractors, superTypeIsInjectable);
}

static class ClassInjectorVisitor extends ClassVisitor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

import io.quarkus.gizmo.Gizmo;

class MultipartTransformer implements BiFunction<String, ClassVisitor, ClassVisitor> {

private static final String INJECTION_TARGET_BINARY_NAME = ResteasyReactiveInjectionTarget.class.getName()
Expand All @@ -28,7 +30,7 @@ public MultipartTransformer(String populatorName) {

@Override
public ClassVisitor apply(String s, ClassVisitor visitor) {
return new MultipartClassVisitor(Opcodes.ASM8, visitor, populatorName);
return new MultipartClassVisitor(Gizmo.ASM_API_VERSION, visitor, populatorName);
}

static class MultipartClassVisitor extends ClassVisitor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.util.Printer;
import org.objectweb.asm.util.Textifier;
import org.objectweb.asm.util.TraceClassVisitor;
import org.objectweb.asm.util.TraceMethodVisitor;

import io.quarkus.gizmo.Gizmo;

@Provider
public class IllegalClassExceptionMapper implements ExceptionMapper<IncompatibleClassChangeError> {

Expand All @@ -29,7 +30,7 @@ public static class MethodFindingClassVisitor extends ClassVisitor {
private PrintWriter writer;

public MethodFindingClassVisitor(String method, PrintWriter writer) {
super(Opcodes.ASM8);
super(Gizmo.ASM_API_VERSION);
this.method = method;
this.writer = writer;
textifier = new Textifier();
Expand Down

0 comments on commit c3458c6

Please sign in to comment.