Allow UriTemplate to be built with an empty template

See gh-32432
This commit is contained in:
Kasper Bisgaard
2024-03-13 10:20:27 +01:00
committed by Stéphane Nicoll
parent 723c94e5ac
commit 1b25a1506a
2 changed files with 12 additions and 1 deletions

View File

@@ -66,7 +66,7 @@ public class UriTemplate implements Serializable {
* @param uriTemplate the URI template string
*/
public UriTemplate(String uriTemplate) {
Assert.hasText(uriTemplate, "'uriTemplate' must not be null");
Assert.notNull(uriTemplate, "'uriTemplate' must not be null");
this.uriTemplate = uriTemplate;
this.uriComponents = UriComponentsBuilder.fromUriString(uriTemplate).build();