mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Handle URI as candidate for a merge from a parent builder
Closes gh-33057
This commit is contained in:
+3
@@ -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