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: Eliminate compile warning in EndpointResolverMiddleware #1025

Merged
merged 4 commits into from
Jun 23, 2023

Conversation

jbelkins
Copy link
Contributor

Issue #

#1002

Description of changes

The operation stack context is being copied to a new variable, updatedContext. This is causing the following warning at compile time, for every service:

Variable 'updatedContext' was never mutated; consider changing to 'let' constant

Copying context to a new variable before modifying it is unneeded since its type is HttpContext (a reference type), hence the warning.

This change modifies the original context instead of copying it, which has the same effect (minus the compile warning.)

New/existing dependencies impact assessment, if applicable

No new dependencies were added to this change.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jbelkins jbelkins requested a review from waahm7 June 23, 2023 16:50
@jbelkins jbelkins merged commit 25e1418 into main Jun 23, 2023
7 checks passed
@jbelkins jbelkins deleted the jbe/fix_modifiedContext_compile_warning branch June 23, 2023 20:23
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.

2 participants