-
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
Allow use of abstract classes in Quarkus REST in the same way as interfaces #41606
Conversation
geoand
commented
Jul 2, 2024
- Fixes: Quarkus REST abstract resources with @Path requires impl. to be CDI beans while RESTEasy does not #41567
@michalvavrik would you like to test this and see if it fixes the various use cases you had in mind? It does fix the one you linked you, but IIUC you had more. |
I would. I'll be back in 2 hours and test it. Thanks for the fix. |
Thanks! No rush whatsoever |
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.
Fixed all my issues, thanks!
BTW. tests that are fixed by this will be part of my next PR for endpoint. impl. security checks in Quarkus REST
Excellent, thanks! |
This comment has been minimized.
This comment has been minimized.
Shall we backport this fix too? |
// handle abstract classes | ||
Set<ClassInfo> abstractScannedResources = scannedResources.values().stream().filter(ClassInfo::isAbstract) | ||
.collect(Collectors.toSet()); | ||
for (ClassInfo abstractScannedResource : abstractScannedResources) { |
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.
Maybe avoid the extra iteration above and call isAbstract
here?
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.
Not sure what you are referring to here
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.
You are creating a Set
above just to iterate again in this loop, I am suggesting merging both loops to a single one
sure yeah |
Triggered by quarkusio/quarkus#41606 (cherry picked from commit 214fdfe)
Triggered by quarkusio/quarkus#41606 (cherry picked from commit 214fdfe)
Triggered by quarkusio/quarkus#41606 (cherry picked from commit 214fdfe)