Skip to content

Conversation

@OlgaMaciaszek
Copy link
Collaborator

No description provided.

@OlgaMaciaszek OlgaMaciaszek added this to the 5.0.0-M1 milestone May 19, 2025
@OlgaMaciaszek OlgaMaciaszek self-assigned this May 19, 2025
@OlgaMaciaszek OlgaMaciaszek marked this pull request as ready for review May 19, 2025 10:21
HttpClientServiceProperties.Group groupProperties = clientServiceProperties.getGroup().get(groupName);
if (groupProperties == null || groupProperties.getBaseUrl() == null) {
String baseUrlString = groupProperties == null ? null : groupProperties.getBaseUrl();
URI existingBaseUrl = baseUrlString == null ? null : URI.create(baseUrlString);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like some of this logic could be simplified if you checked if baseUrlString == null

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wanted to have a local variable to be able to use it later in the else if section: else if ("lb".equalsIgnoreCase(existingBaseUrl.getScheme()))

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I think what would make this clearer would be to just simplify this to URI existingBaseUrl = groupProperties == null ? null : URI.create(groupProperties.getBaseUrl());

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

groupProperties.getBaseUrl() can also be null.

@OlgaMaciaszek OlgaMaciaszek merged commit 1658768 into 5.0.x May 19, 2025
1 check passed
@OlgaMaciaszek OlgaMaciaszek deleted the load-balance-by-scheme branch July 25, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants