Skip to content

Commit

Permalink
Register method for reflection when read or write interceptors exist
Browse files Browse the repository at this point in the history
This is needed because the interceptors need to get method
metadata

Fixes: quarkusio#44564
  • Loading branch information
geoand committed Nov 21, 2024
1 parent c872c3b commit 314e3d5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,14 @@ public void additionalReflection(BeanArchiveIndexBuildItem beanArchiveIndexBuild

// when a ContainerResponseFilter exists, it can potentially do responseContext.setEntityStream()
// which then forces the use of the slow path for calling writers
if (!resourceInterceptorsBuildItem.getResourceInterceptors().getContainerResponseFilters().isEmpty()) {
ResourceInterceptors resourceInterceptors = resourceInterceptorsBuildItem.getResourceInterceptors();
if (!resourceInterceptors.getContainerResponseFilters().isEmpty()) {
serializersRequireResourceReflection = true;
}
// when ReaderInterceptor or WriterInterceptor is used, we need to access to the Method
// because of InterceptorContext
if (!(resourceInterceptors.getReaderInterceptors().isEmpty()
&& resourceInterceptors.getWriterInterceptors().isEmpty())) {
serializersRequireResourceReflection = true;
}

Expand Down

0 comments on commit 314e3d5

Please sign in to comment.