Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply minor polish to RESTEasy Reactive code #24994

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -47,10 +45,6 @@ protected void handleRequestScopeActivation() {
}
}

private static Event<SecurityIdentity> createEvent() {
return Arc.container().beanManager().getEvent().select(SecurityIdentity.class);
}

protected SecurityContext createSecurityContext() {
return new ResteasyReactiveSecurityContext(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public void configure(RuntimeValue<Deployment> deployment,
List<RuntimeConfigurableServerRestHandler> 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);
Comment on lines +41 to +42
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why you are doing that? It doesn't look like a hotspot?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a hotspot, but we try to limit allocations in RR wherever possible

}
}
}