diff --git a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/core/Serialisers.java b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/core/Serialisers.java index 3f0b755be1ab09..72a0a6bb5d1e39 100644 --- a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/core/Serialisers.java +++ b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/core/Serialisers.java @@ -151,7 +151,9 @@ public List> findBuildTimeWriters(Class entityType, Runt } } - return toMessageBodyWriters(findResourceWriters(writers, klass, produces, runtimeType)); + var resourceWriters = findResourceWriters(writers, klass, produces, runtimeType); + resourceWriters.sort(new ResourceWriter.ResourceWriterComparator(produces)); + return toMessageBodyWriters(resourceWriters); } protected List findResourceWriters(QuarkusMultivaluedMap, ResourceWriter> writers, Class klass,