Skip to content
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

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Sep 16, 2024

Hopefully resolves #12234

@laurit laurit requested a review from a team September 16, 2024 11:45
return holder != null ? holder.route : null;
}

public static void set(Context context, String route) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe rename to updateIfExists?

Copy link
Contributor Author

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe rename to withIfNotExists?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or simply init?

Copy link
Contributor Author

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

@trask trask merged commit d666c35 into open-telemetry:main Sep 17, 2024
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vert.x Web Router/SubRouter causes root span name / route to be incorrect
4 participants