From b624e78ffa6be16334c34e8df4a1fd97a6c61d38 Mon Sep 17 00:00:00 2001 From: markusdlugi Date: Tue, 9 Mar 2021 09:05:13 +0100 Subject: [PATCH] Fix ClassRoutingHandler not using sortedOriginalMediaTypes in else block --- .../resteasy/reactive/server/handlers/ClassRoutingHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java index 8fa8621fac167..8ba2f4100f5ea 100644 --- a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java +++ b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java @@ -137,7 +137,7 @@ public void handle(ResteasyReactiveRequestContext requestContext) throws Excepti } else { acceptsMediaTypes = Collections.singletonList(toMediaType(accepts)); } - if (MediaTypeHelper.getFirstMatch(Arrays.asList(target.value.getProduces().getSortedMediaTypes()), + if (MediaTypeHelper.getFirstMatch(Arrays.asList(target.value.getProduces().getSortedOriginalMediaTypes()), acceptsMediaTypes) == null) { throw new NotAcceptableException(); }