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
When a RESTEasy Reactive client API interface has a method that returns an InputStream, calling response.bufferEntity() in a ResponseExceptionMapper throws a BlockingNotAllowedException. If the API client method has a different return type, such as String, calling response.bufferEntity() succeeds.
Describe the bug
When a RESTEasy Reactive client API interface has a method that returns an
InputStream
, callingresponse.bufferEntity()
in aResponseExceptionMapper
throws aBlockingNotAllowedException
. If the API client method has a different return type, such asString
, callingresponse.bufferEntity()
succeeds.If this is intended behavior the documentation at https://quarkus.io/guides/rest-client-reactive should be updated with instructions on how to deal with this situation.
Strangely, annotating the API client method with
@Blocking
made no difference.Moreover, the behavior is dependent on the response body being empty or not. Here is the list of combinations I've tested:
Expected behavior
Calling response.bufferEntity() should be possible in all cases, or the documentation should be updated to point out the special cases.
Actual behavior
See above.
How to Reproduce?
Reproducer: code-with-quarkus.zip
mvn test
. Observe RestApiTest#testGetStream failing and RestApiTest#testGetText succeeding.Output of
uname -a
orver
CYGWIN_NT-10.0-22000
Output of
java -version
java version "17.0.3.1" 2022-04-22 LTS Java(TM) SE Runtime Environment (build 17.0.3.1+2-LTS-6) Java HotSpot(TM) 64-Bit Server VM (build 17.0.3.1+2-LTS-6, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6
Additional information
No response
The text was updated successfully, but these errors were encountered: