UriComponentsBuilder.fromUriString accepts empty URIs

Issue: SPR-13257
master
Juergen Hoeller 9 years ago
parent 27bd8d0374
commit 8196af4bc5
  1. 2
      spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java

@ -183,7 +183,7 @@ public class UriComponentsBuilder implements Cloneable {
* @return the new {@code UriComponentsBuilder}
*/
public static UriComponentsBuilder fromUriString(String uri) {
Assert.hasLength(uri, "'uri' must not be empty");
Assert.notNull(uri, "'uri' must not be null");
Matcher matcher = URI_PATTERN.matcher(uri);
if (matcher.matches()) {
UriComponentsBuilder builder = new UriComponentsBuilder();

Loading…
Cancel
Save