Skip to content

Commit

Permalink
Ensure that build time writers are properly sorted
Browse files Browse the repository at this point in the history
This is needed because there were cases where the built-in
providers could be returned before the application ones.
  • Loading branch information
geoand authored and manovotn committed Oct 6, 2022
1 parent fd7beb6 commit fc76c76
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ public List<MessageBodyWriter<?>> 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<ResourceWriter> findResourceWriters(QuarkusMultivaluedMap<Class<?>, ResourceWriter> writers, Class<?> klass,
Expand Down

0 comments on commit fc76c76

Please sign in to comment.