UriComponentsBuilder.fromUriString accepts empty URIs
Issue: SPR-13257
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user