You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the RESTeasy Reactive guide, filter parameters can take any context object. However, declaring UriInfo as a parameter in a response filter results in a runtime error. (This happens for a few other context objects.)
I'm not sure if this is a documentation or implementation issue.
Expected behavior
It's possible to access UriInfo in a response filter with ContainerRequestContext#getUriInfo(). Ideally, response filters could directly declare UriInfo without error.
Actual behavior
Caused by: java.lang.RuntimeException: Parameter 'uriInfo' of method 'getFilter of class 'org.acme.Filters' is not allowed
at io.quarkus.resteasy.reactive.server.deployment.CustomFilterGenerator.getResponseFilterResultHandles(CustomFilterGenerator.java:511)
at io.quarkus.resteasy.reactive.server.deployment.CustomFilterGenerator.generateStandardContainerResponseFilter(CustomFilterGenerator.java:424)
at io.quarkus.resteasy.reactive.server.deployment.CustomFilterGenerator.generateContainerResponseFilter(CustomFilterGenerator.java:336)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveScanningProcessor.handleCustomAnnotatedMethods(ResteasyReactiveScanningProcessor.java:369)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:829)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
How to Reproduce?
Create a filter class which declares javax.ws.rs.core.UriInfo as a parameter.
Describe the bug
According to the RESTeasy Reactive guide, filter parameters can take any context object. However, declaring
UriInfo
as a parameter in a response filter results in a runtime error. (This happens for a few other context objects.)It seems that
UriInfo
is a valid parameter forgetRequestFilterResultHandles
but not forgetResponseFilterResultHandles
.https://github.com/quarkusio/quarkus/blob/4757a61b87556c456724ef63f9b8fd8068b8eacd/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/filters/CustomFilterGenerator.java#L289-L293
I'm not sure if this is a documentation or implementation issue.
Expected behavior
It's possible to access
UriInfo
in a response filter withContainerRequestContext#getUriInfo()
. Ideally, response filters could directly declareUriInfo
without error.Actual behavior
How to Reproduce?
Create a filter class which declares
javax.ws.rs.core.UriInfo
as a parameter.Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.5.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
quarkusio#21956
The text was updated successfully, but these errors were encountered: