Skip to content

Commit

Permalink
Break build cycle brought in quarkusio#35209
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand authored and mkouba committed Sep 7, 2023
1 parent 14f3ba9 commit 909025d
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static io.quarkus.resteasy.reactive.common.deployment.QuarkusResteasyReactiveDotNames.HTTP_SERVER_REQUEST;
import static io.quarkus.resteasy.reactive.common.deployment.QuarkusResteasyReactiveDotNames.HTTP_SERVER_RESPONSE;
import static io.quarkus.resteasy.reactive.common.deployment.QuarkusResteasyReactiveDotNames.ROUTING_CONTEXT;
import static io.quarkus.resteasy.reactive.common.deployment.ResteasyReactiveCommonProcessor.getExcludedClasses;

import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -33,6 +34,7 @@
import org.jboss.resteasy.reactive.common.processor.ResteasyReactiveDotNames;
import org.jboss.resteasy.reactive.common.processor.scanning.ApplicationScanningResult;
import org.jboss.resteasy.reactive.common.processor.scanning.ResteasyReactiveInterceptorScanner;
import org.jboss.resteasy.reactive.common.processor.scanning.ResteasyReactiveScanner;
import org.jboss.resteasy.reactive.server.core.ExceptionMapping;
import org.jboss.resteasy.reactive.server.model.ContextResolvers;
import org.jboss.resteasy.reactive.server.model.ParamConverterProviders;
Expand All @@ -47,6 +49,7 @@
import io.quarkus.arc.ArcUndeclaredThrowableException;
import io.quarkus.arc.Unremovable;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.arc.deployment.BuildTimeConditionBuildItem;
import io.quarkus.arc.deployment.BuildTimeEnabledProcessor;
import io.quarkus.arc.deployment.GeneratedBeanBuildItem;
import io.quarkus.arc.deployment.GeneratedBeanGizmoAdaptor;
Expand All @@ -62,6 +65,7 @@
import io.quarkus.resteasy.reactive.common.deployment.ApplicationResultBuildItem;
import io.quarkus.resteasy.reactive.common.deployment.ResourceInterceptorsContributorBuildItem;
import io.quarkus.resteasy.reactive.common.deployment.ResourceScanningResultBuildItem;
import io.quarkus.resteasy.reactive.common.runtime.ResteasyReactiveConfig;
import io.quarkus.resteasy.reactive.server.spi.MethodScannerBuildItem;
import io.quarkus.resteasy.reactive.server.spi.UnwrappedExceptionBuildItem;
import io.quarkus.resteasy.reactive.spi.ContainerRequestFilterBuildItem;
Expand Down Expand Up @@ -247,14 +251,21 @@ public void scanForFeatures(CombinedIndexBuildItem combinedIndexBuildItem,
@SuppressWarnings({ "unchecked", "rawtypes" })
@BuildStep
public ContextResolversBuildItem scanForContextResolvers(CombinedIndexBuildItem combinedIndexBuildItem,
ApplicationResultBuildItem applicationResultBuildItem,
BuildProducer<AdditionalBeanBuildItem> additionalBeanBuildItemBuildProducer,
BuildProducer<ReflectiveClassBuildItem> reflectiveClassBuildItemBuildProducer,
List<ContextResolverBuildItem> additionalResolvers) {
List<ContextResolverBuildItem> additionalResolvers,
List<BuildTimeConditionBuildItem> buildTimeConditions,
ResteasyReactiveConfig config) {

IndexView index = combinedIndexBuildItem.getComputingIndex();
AdditionalBeanBuildItem.Builder beanBuilder = AdditionalBeanBuildItem.builder().setUnremovable();

ApplicationScanningResult applicationScanningResult = ResteasyReactiveScanner
.scanForApplicationClass(combinedIndexBuildItem.getComputingIndex(),
config.buildTimeConditionAware() ? getExcludedClasses(buildTimeConditions) : Collections.emptySet());

ContextResolvers resolvers = ResteasyReactiveContextResolverScanner.scanForContextResolvers(index,
applicationResultBuildItem.getResult());
applicationScanningResult);
for (Map.Entry<Class<?>, List<ResourceContextResolver>> entry : resolvers.getResolvers().entrySet()) {
for (ResourceContextResolver i : entry.getValue()) {
beanBuilder.addBeanClass(i.getClassName());
Expand Down

0 comments on commit 909025d

Please sign in to comment.