-
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
Preserve the type of multi in the SecurityHandler #21270
Preserve the type of multi in the SecurityHandler #21270
Conversation
…MultiContinuation. Do not use transformToMulti as we want to preserve the type of multi produced by the user method. This is required for Reactive Routes to handle custom Multi serialization.
Oh, very nice! I didn't know about this capability |
.onItem().transformToMulti(new MultiContinuation(ic)); | ||
// Do not use transformToMulti as we want to preserve the type of multi produced by the user method. | ||
// This is required for Reactive Routes to handle custom Multi serialization. | ||
.toMulti().plug(x -> new MultiContinuation(ic).apply(x)); |
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.
what's the actual difference?
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.
IIUIC you don't wrap the Multi
produced by the user method but instead call new MultiContinuation(ic).apply(x)
when the Multi
instance is created, i.e. when the plug()
method is being executed.
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.
Uni.toMulti().plug()
looks a bit like some dark magic but if it does what I think it does then +1 :D
would be great to have a test that it actually fixes the linked issue :) |
Failing Jobs - Building 03e4b49
Failures⚙️ Native Tests - Windows - hibernate-validator #- Failing: integration-tests/hibernate-validator
📦 integration-tests/hibernate-validator✖ |
plug is not the most common API. It's used to create your own operator. Here, it's just convenient as we will return the multi we create directly. |
Is it possible to backport this fix to 2.4? |
It has already been marked for backporting (see the labels) |
Verified the fix using 2.4.2 version and it resolved #21044. But it introduced a different issue where |
@MM87037 could you create a separete issue and create a reproducer? |
Sure. Thanks |
Avoid using
transformToMulti
as we want to preserve the type of multi produced by the user method. This is required for Reactive Routes to handle custom Multi serialization.Fix #21044.