From 39d8e588057559a31c0ffc1936486649bc95132a Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 19 Apr 2022 08:44:24 +0300 Subject: [PATCH] Apply minor polish to RESTEasy Reactive code --- .../runtime/QuarkusResteasyReactiveRequestContext.java | 6 ------ .../server/runtime/ResteasyReactiveRuntimeRecorder.java | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/QuarkusResteasyReactiveRequestContext.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/QuarkusResteasyReactiveRequestContext.java index 4496dd8b19f1f..2e65c76cd2611 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/QuarkusResteasyReactiveRequestContext.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/QuarkusResteasyReactiveRequestContext.java @@ -1,6 +1,5 @@ package io.quarkus.resteasy.reactive.server.runtime; -import javax.enterprise.event.Event; import javax.ws.rs.core.SecurityContext; import org.jboss.resteasy.reactive.server.core.Deployment; @@ -9,7 +8,6 @@ import org.jboss.resteasy.reactive.server.vertx.VertxResteasyReactiveRequestContext; import org.jboss.resteasy.reactive.spi.ThreadSetupAction; -import io.quarkus.arc.Arc; import io.quarkus.security.identity.CurrentIdentityAssociation; import io.quarkus.security.identity.SecurityIdentity; import io.quarkus.vertx.core.runtime.context.VertxContextSafetyToggle; @@ -47,10 +45,6 @@ protected void handleRequestScopeActivation() { } } - private static Event createEvent() { - return Arc.container().beanManager().getEvent().select(SecurityIdentity.class); - } - protected SecurityContext createSecurityContext() { return new ResteasyReactiveSecurityContext(context); } diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRuntimeRecorder.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRuntimeRecorder.java index a229d8dee5119..ad23a9e42c26f 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRuntimeRecorder.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/ResteasyReactiveRuntimeRecorder.java @@ -38,8 +38,8 @@ public void configure(RuntimeValue deployment, List runtimeConfigurableServerRestHandlers = deployment.getValue() .getRuntimeConfigurableServerRestHandlers(); deployment.getValue().setRuntimeConfiguration(runtimeConfiguration); - for (RuntimeConfigurableServerRestHandler handler : runtimeConfigurableServerRestHandlers) { - handler.configure(runtimeConfiguration); + for (int i = 0; i < runtimeConfigurableServerRestHandlers.size(); i++) { + runtimeConfigurableServerRestHandlers.get(i).configure(runtimeConfiguration); } } }