Skip to content

Commit 3984266

Browse files
TAKETODAYsdeleuze
authored andcommitted
Remove unused method in UriComponentsBuilder
This commit removes HierarchicalUriComponents#checkSchemeAndHost unused private method. Closes gh-33684
1 parent a75f22e commit 3984266

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java

-9
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,6 @@ public static UriComponentsBuilder fromHttpUrl(String httpUrl) throws InvalidUrl
243243
return fromUriString(httpUrl);
244244
}
245245

246-
private static void checkSchemeAndHost(String uri, @Nullable String scheme, @Nullable String host) {
247-
if (StringUtils.hasLength(scheme) && scheme.startsWith("http") && !StringUtils.hasLength(host)) {
248-
throw new IllegalArgumentException("[" + uri + "] is not a valid HTTP URL");
249-
}
250-
if (StringUtils.hasLength(host) && host.startsWith("[") && !host.endsWith("]")) {
251-
throw new IllegalArgumentException("Invalid IPV6 host in [" + uri + "]");
252-
}
253-
}
254-
255246
/**
256247
* Create a new {@code UriComponents} object from the URI associated with
257248
* the given HttpRequest while also overlaying with values from the headers

0 commit comments

Comments
 (0)