Skip to content

Commit 6a35e36

Browse files
committed
Remove unused method checkSchemeAndHost in UriComponentsBuilder
1 parent 0f25c75 commit 6a35e36

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

Lines changed: 0 additions & 9 deletions
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)