-
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: Fix native mode when using Files #26002
Conversation
When having the following resource: ```java @post @consumes(MediaType.APPLICATION_OCTET_STREAM) public String update(File file) { // .. } ``` This works fine when running on JVM, but not in Native where fails with a NoSuchMethodException exception. To fix this issue, I've registered all the resource classes (the ones annotated with `@ApplicationPath` and `@Path`) for reflection usage. In addition to this change: - I removed some unused methods and fields from the resteasy reactive processor - I added some coverage of the getting started resteasy reactive client (I also reproduced this issue in this test). Fix quarkusio#25973
} | ||
|
||
// Ensure native support of resource endpoints: | ||
reflectiveClass.produce(new ReflectiveClassBuildItem(false, true, false, resourceClass.getClassName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geoand this is the fix I added to solve the linked issue. However, as it works when the resource is not using a File class, I doubt this is the right fix... tho I could not find the right path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this is not the fix we want to apply. I will have a closer look later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I converted this pull request in draft, just to reuse the tests and the clean up.
When having the following resource:
This works fine when running on JVM, but not in Native where fails with a NoSuchMethodException exception.
To fix this issue, I've registered all the resource classes (the ones annotated with
@ApplicationPath
and@Path
) for reflection usage.In addition to this change:
Fix #25973