diff --git a/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/exceptionmappers/ServerExceptionMapperGenerator.java b/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/exceptionmappers/ServerExceptionMapperGenerator.java index e40a932562258..60ddd874a0b23 100644 --- a/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/exceptionmappers/ServerExceptionMapperGenerator.java +++ b/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/exceptionmappers/ServerExceptionMapperGenerator.java @@ -273,7 +273,8 @@ public static Map generateGlobalMapper(MethodInfo targetMethod, // generate a constructor that takes the Instance as an argument in order to avoid missing bean issues if the target has been conditionally disabled // the body can freely read the instance value because if the target has been conditionally disabled, the generated class will not be instantiated ctor = cc.getMethodCreator("", void.class, Instance.class).setSignature( - String.format("(Ljavax/enterprise/inject/Instance;)V", + String.format("(L%s;)V", + Instance.class.getName().replace('.', '/'), targetClass.name().toString().replace('.', '/'))); } else { // generate a constructor that takes the target class as an argument - this class is a CDI bean so Arc will be able to inject into the generated class diff --git a/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/filters/CustomFilterGenerator.java b/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/filters/CustomFilterGenerator.java index bb08d63067ee3..2c99a7eaac714 100644 --- a/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/filters/CustomFilterGenerator.java +++ b/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/filters/CustomFilterGenerator.java @@ -522,7 +522,9 @@ private FieldDescriptor generateConstructorAndDelegateField(ClassCreator cc, Cla if (checkForOptionalBean) { // generate a constructor that takes the Instance as an argument ctor = cc.getMethodCreator("", void.class, Instance.class).setSignature( - String.format("(Ljavax/enterprise/inject/Instance;)V", declaringClassName.replace('.', '/'))); + String.format("(L%s;)V", + Instance.class.getName().replace('.', '/'), + declaringClassName.replace('.', '/'))); } else { // generate a constructor that takes the target class as an argument - this class is a CDI bean so Arc will be able to inject into the generated class ctor = cc.getMethodCreator("", void.class, declaringClassName);