Skip to content

Commit

Permalink
Remove unused method in UriComponentsBuilder
Browse files Browse the repository at this point in the history
This commit removes HierarchicalUriComponents#checkSchemeAndHost
unused private method.

Closes gh-33684
  • Loading branch information
TAKETODAY authored and sdeleuze committed Oct 14, 2024
1 parent a75f22e commit 3984266
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,6 @@ public static UriComponentsBuilder fromHttpUrl(String httpUrl) throws InvalidUrl
return fromUriString(httpUrl);
}

private static void checkSchemeAndHost(String uri, @Nullable String scheme, @Nullable String host) {
if (StringUtils.hasLength(scheme) && scheme.startsWith("http") && !StringUtils.hasLength(host)) {
throw new IllegalArgumentException("[" + uri + "] is not a valid HTTP URL");
}
if (StringUtils.hasLength(host) && host.startsWith("[") && !host.endsWith("]")) {
throw new IllegalArgumentException("Invalid IPV6 host in [" + uri + "]");
}
}

/**
* Create a new {@code UriComponents} object from the URI associated with
* the given HttpRequest while also overlaying with values from the headers
Expand Down

0 comments on commit 3984266

Please sign in to comment.