-
Notifications
You must be signed in to change notification settings - Fork 913
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
Fix vert.x route containing dupicate segments when RoutingContext.next is used #12260
Conversation
return holder != null ? holder.route : null; | ||
} | ||
|
||
public static void set(Context context, String route) { |
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 rename to updateIfExists
?
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.
There are similar set
methods in other ImplicitContextKeyed
implementations. If we are going to rename then we should rename all the similar usages and probably the get
method also. I think the holder != null
check is just defensive coding. It really should not be null unless the instrumented code has changed in an unexpected way, so the IfExists
suffix isn't really necessary in my opinion.
this.route = route; | ||
} | ||
|
||
public static Context with(Context context, String route) { |
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 rename to withIfNotExists
?
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.
or simply init
?
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.
renamed to init
because init
is in a couple of other ImplicitContextKeyed
implementations
Hopefully resolves #12234