You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-test/src/main/java/org/springframework/test/web/servlet/request/AbstractMockHttpServletRequestBuilder.java
+4-18Lines changed: 4 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -342,7 +342,7 @@ public B accept(String... mediaTypes) {
342
342
* @param values one or more header values
343
343
*/
344
344
publicBheader(Stringname, Object... values) {
345
-
addToMultiValueMap(this.headers, name, values);
345
+
this.headers.addAll(name, Arrays.asList(values));
346
346
returnself();
347
347
}
348
348
@@ -372,11 +372,7 @@ public B headers(HttpHeaders httpHeaders) {
372
372
* @param values one or more values
373
373
*/
374
374
publicBparam(Stringname, String... values) {
375
-
if (values.length == 0) {
376
-
this.parameters.computeIfAbsent(name, k -> newArrayList<>());
Copy file name to clipboardExpand all lines: spring-test/src/test/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilderTests.java
0 commit comments