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
Describe the bug
A rest endpoint returning a multi, missing a @Produces annotation results in NullPointerException thrown at runtime.
java.lang.NullPointerException
at org.jboss.resteasy.reactive.server.handlers.MultiResponseHandler.handle(MultiResponseHandler.java:185)
at org.jboss.resteasy.reactive.server.handlers.MultiResponseHandler.handle(MultiResponseHandler.java:16)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:117)
at org.jboss.resteasy.reactive.server.handlers.RestInitialHandler.beginProcessing(RestInitialHandler.java:47)
at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:17)
at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:7)
at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:137)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
at io.quarkus.vertx.http.runtime.StaticResourcesRecorder.lambda$start$1(StaticResourcesRecorder.java:62)
at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
Adding the annotation without value produces a different NPE:
java.lang.RuntimeException: java.lang.RuntimeException: Failed to process method org.acme.GreetingResource#io.smallrye.mutiny.Multi<java.util.Map> check(java.lang.String url)
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:235)
at io.quarkus.resteasy.reactive.server.deployment.ResteasyReactiveProcessor.setupEndpoints(ResteasyReactiveProcessor.java:388)
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:920)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: Failed to process method org.acme.GreetingResource#io.smallrye.mutiny.Multi<java.util.Map> check(java.lang.String url)
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createResourceMethod(EndpointIndexer.java:506)
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:276)
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createEndpoints(EndpointIndexer.java:206)
... 11 more
Caused by: java.lang.NullPointerException
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.extractProducesConsumesValues(EndpointIndexer.java:622)
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.extractProducesConsumesValues(EndpointIndexer.java:611)
at org.jboss.resteasy.reactive.common.processor.EndpointIndexer.createResourceMethod(EndpointIndexer.java:463)
... 13 more
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:308)
at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:195)
Expected behavior
Build error
Actual behavior
(Describe the actual behavior clearly and concisely.)
more info: https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/html.20web.20requests/near/229859196
Describe the bug
A rest endpoint returning a multi, missing a
@Produces
annotation results in NullPointerException thrown at runtime.Adding the annotation without value produces a different
NPE
:Expected behavior
Build error
Actual behavior
(Describe the actual behavior clearly and concisely.)
To Reproduce
https://github.com/thomaswue/quarkus-example/blob/4bd0ee66405d26ab7d0bdc36593db68404218324/src/main/java/org/acme/GreetingResource.java
The text was updated successfully, but these errors were encountered: