Skip to content

Commit 7ffd4e7

Browse files
committed
Sync test fixture MockServerHttpRequest implementation with original
1 parent 8448dc9 commit 7ffd4e7

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,6 @@ public interface BaseBuilder<B extends BaseBuilder<B>> {
282282
/**
283283
* Add the given header values.
284284
* @param headers the header values
285-
* @deprecated in favor of {@link #headers(HttpHeaders)}
286-
*/
287-
@Deprecated(since = "7.0", forRemoval = true)
288-
B headers(MultiValueMap<String, String> headers);
289-
290-
/**
291-
* Add the given header values.
292-
* @param headers the header values
293-
* @since 7.0
294285
*/
295286
B headers(HttpHeaders headers);
296287

@@ -332,12 +323,6 @@ public interface BaseBuilder<B extends BaseBuilder<B>> {
332323
*/
333324
B ifUnmodifiedSince(long ifUnmodifiedSince);
334325

335-
/**
336-
* Set the values of the {@code If-Match} header.
337-
* @param ifMatches the new value of the header
338-
*/
339-
B ifMatch(String... ifMatches);
340-
341326
/**
342327
* Set the values of the {@code If-None-Match} header.
343328
* @param ifNoneMatches the new value of the header
@@ -483,13 +468,6 @@ public BodyBuilder header(String headerName, String... headerValues) {
483468
return this;
484469
}
485470

486-
@Override
487-
@Deprecated(since = "7.0", forRemoval = true)
488-
public BodyBuilder headers(MultiValueMap<String, String> headers) {
489-
this.headers.putAll(headers);
490-
return this;
491-
}
492-
493471
@Override
494472
public BodyBuilder headers(HttpHeaders headers) {
495473
this.headers.putAll(headers);
@@ -538,12 +516,6 @@ public BodyBuilder ifUnmodifiedSince(long ifUnmodifiedSince) {
538516
return this;
539517
}
540518

541-
@Override
542-
public BodyBuilder ifMatch(String... ifMatches) {
543-
this.headers.setIfMatch(Arrays.asList(ifMatches));
544-
return this;
545-
}
546-
547519
@Override
548520
public BodyBuilder ifNoneMatch(String... ifNoneMatches) {
549521
this.headers.setIfNoneMatch(Arrays.asList(ifNoneMatches));

spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ void ifMatchWildcardShouldMatchWhenETagMissing() {
480480
@Test
481481
void ifMatchValueShouldMatchWhenETagMatches() {
482482
MockServerHttpRequest mockRequest = MockServerHttpRequest.put("/")
483-
.ifMatch("\"first\"", "\"second\"").build();
483+
.header(HttpHeaders.IF_MATCH, "\"first\"", "\"second\"").build();
484484
DefaultServerRequest request = createRequest(mockRequest);
485485
Mono<ServerResponse> result = request.checkNotModified("\"second\"");
486486

0 commit comments

Comments
 (0)