-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
RESTEasy Reactive does not call method ParamConverter#toString for collection elements #36639
Comments
/cc @FroMage (resteasy-reactive), @geoand (resteasy-reactive), @stuartwdouglas (resteasy-reactive) |
Thanks for reporting. I'll try and have a look next week |
#36885 fixes the issue |
geoand
added a commit
that referenced
this issue
Nov 6, 2023
Handle generic types for ParamConverter in REST Client
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Nov 6, 2023
Fixes: quarkusio#36639 (cherry picked from commit 1aff10f)
DavideD
pushed a commit
to DavideD/quarkus
that referenced
this issue
Nov 27, 2023
aloubyansky
pushed a commit
to aloubyansky/quarkus
that referenced
this issue
Jan 14, 2024
Fixes: quarkusio#36639 (cherry picked from commit 1aff10f)
holly-cummins
pushed a commit
to holly-cummins/quarkus
that referenced
this issue
Feb 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The fix in #35774 allows the definition of REST resources with a collection of parameterized types as a query parameter.
Example (from #35774):
The problem what I found now is that
toString
method of myParamConverter
implementation is not called for the collection elements. Because of this thefromString
method gets a class reference as String value (e.g. org.acme.WrapperClass@59e082f8) instead of the expected one.So the current implementation works fine when I simply provide a String value when calling the REST resource. This is what I did when testing the fix of #35774.
But when I now use the REST client to call a resource of another service, the
toString
method should be called to serialize the value and on the other side thefromString
method should be called. For thefromString
this works fine, but thetoString
method is never called.Expected behavior
The
toString
method from parameter converters should be used like in RESTEasy Classic - so also for collections.Actual behavior
The
toString
method is never called for collection elements.How to Reproduce?
Reproducer: https://github.com/timonzi/resteasy-reactive-wrapper-collection-elements
ParametersResourceTest
-->testCollectionViaClient
will fail (because of the unexpected value in thefromString
implementation)pom.xml
) --> tests will workOutput of
uname -a
orver
Linux nb-timonz 6.2.0-31-generic #31~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Aug 16 13:45:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
Quarkus version or git rev
3.2.7.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Additional information
The fix of #35774 is also included in 3.2.7.Final. This version is used in the reproducer.
The text was updated successfully, but these errors were encountered: