-
Notifications
You must be signed in to change notification settings - Fork 87
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
Not properly handling Optional param in JAX-RS method #210
Comments
I'm labeling this as both a bug (the report in quarkus is that the build fails) and also an enhancement, because we should mark the query parameter as not required in this case. And perhaps mark any method arguments that are query parameters as Thoughts on the latter point, @MikeEdgar and @msavy ? |
@EricWittmann thanks for opening this. Also, the build fails when Optional is a return type. |
I would stay away from marking it required when Aside from that, I think the reason the build is failing in the original issue is due to something other than the use of |
Exactly, and the class here is |
Ahh, right. I forgot about these classes being in the index. So it is the same issue. |
@EricWittmann, @msavy - a few additional cases this should probably cover. What are your thoughts?
|
This all sounds good to me. I was going to add that for (4) the property should be excluded from the |
The only time the |
FTR, we just had a second report of this very issue in the Quarkus bugtracker. |
@MikeEdgar has a PR addressing the issue. I'll review it today and hopefully we can get it merged asap. |
@EricWittmann do you think it's worth releasing something now to have it fixed in Quarkus 1.0 Final? Code freeze is this evening so we don't have much time. Not sure how risky the fix is though compared to fixing an issue for 2 users who reported it. And how much work it is. |
I think the change is pretty low risk, and the test coverage is quite good in this project. I'm pretty comfortable if a new release were done. What do you think @MikeEdgar ? |
Also it's a good question for @kenfinnigan - since I think he would need to do the release. |
I have no opinion, I just click a button |
I think it's a good time for a release. There are quite a few bug fixes and improvements since 1.1.19 and the schema reference option is now enabled by default. |
@MikeEdgar Anything loose you want to toss in there before Ken clicks the button? :) |
OK then, @gsmet if you are comfortable accepting a new release of this into Quarkus then I think @kenfinnigan can go ahead with the release! Or I guess go ahead with it anyway, and @gsmet can pull it into Quarkus or not, at his discretion. :) |
release triggered |
Cool, thanks everyone! |
@kenfinnigan can you create a PR when the release is done? |
Thanks for the fix @EricWittmann @MikeEdgar :-) |
First reported here: quarkusio/quarkus#5376
When processing the JAX-RS arguments, we should handle
java.util.Optional
appropriately.The text was updated successfully, but these errors were encountered: