Handle URI as candidate for a merge from a parent builder
Closes gh-33057
This commit is contained in:
@@ -592,6 +592,9 @@ public abstract class AbstractMockHttpServletRequestBuilder<B extends AbstractMo
|
||||
if (!(parent instanceof AbstractMockHttpServletRequestBuilder<?> parentBuilder)) {
|
||||
throw new IllegalArgumentException("Cannot merge with [" + parent.getClass().getName() + "]");
|
||||
}
|
||||
if (this.uri == null) {
|
||||
this.uri = parentBuilder.uri;
|
||||
}
|
||||
if (!StringUtils.hasText(this.contextPath)) {
|
||||
this.contextPath = parentBuilder.contextPath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user