diff --git a/extensions/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java b/extensions/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java index be6a952417e85f..8dab005134ac33 100644 --- a/extensions/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java +++ b/extensions/resteasy-common/deployment/src/main/java/io/quarkus/resteasy/common/deployment/ResteasyCommonProcessor.java @@ -527,8 +527,12 @@ private static boolean collectDeclaredProvidersForMethodAndMediaTypeAnnotation(S return true; } } + String[] mediaTypes = { MediaType.WILDCARD }; + if (mediaTypeMethodAnnotationInstance.value() != null) { + mediaTypes = mediaTypeMethodAnnotationInstance.value().asStringArray(); + } if (collectDeclaredProvidersForMediaTypeAnnotationInstance(providersToRegister, categorizedProviders, - mediaTypeMethodAnnotationInstance.value().asStringArray(), methodTarget)) { + mediaTypes, methodTarget)) { return true; }