Skip to content

Commit 97625e3

Browse files
committed
Additional changes because HttpMethod changed from enum to class
See gh-27697
1 parent 1dee80e commit 97625e3

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -238,7 +238,7 @@ public static BodyBuilder method(HttpMethod method, String uri, Object... vars)
238238
* @param vars variables to expand into the template
239239
* @return the created builder
240240
* @since 5.2.7
241-
* @deprecated in favor of {@link #method(HttpMethod, String, Object...)}
241+
* @deprecated as of Spring Framework 6.0 in favor of {@link #method(HttpMethod, String, Object...)}
242242
*/
243243
@Deprecated
244244
public static BodyBuilder method(String httpMethod, String uri, Object... vars) {

spring-test/src/test/java/org/springframework/mock/http/server/reactive/MockServerHttpRequestTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -70,6 +70,7 @@ void httpMethodNotNullOrEmpty(Executable executable) {
7070
assertThat(ex.getMessage()).contains("HTTP method is required.");
7171
}
7272

73+
@SuppressWarnings("deprecation")
7374
static Stream<Executable> httpMethodNotNullOrEmpty() {
7475
String uriTemplate = "/foo bar?a=b";
7576
return Stream.of(
@@ -80,4 +81,5 @@ static Stream<Executable> httpMethodNotNullOrEmpty() {
8081
() -> MockServerHttpRequest.method(" ", uriTemplate).build()
8182
);
8283
}
84+
8385
}

spring-web/src/main/java/org/springframework/http/HttpRequest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
1919
import java.net.URI;
2020

2121
/**
22-
* Represents an HTTP request message, consisting of
23-
* {@linkplain #getMethod() method} and {@linkplain #getURI() uri}.
22+
* Represents an HTTP request message, consisting of a
23+
* {@linkplain #getMethod() method} and a {@linkplain #getURI() URI}.
2424
*
2525
* @author Arjen Poutsma
2626
* @since 3.1
@@ -39,7 +39,7 @@ public interface HttpRequest extends HttpMessage {
3939
* @return the HTTP method as a plain String
4040
* @since 5.0
4141
* @see #getMethod()
42-
* @deprecated in favor of {@link #getMethod()} and
42+
* @deprecated as of Spring Framework 6.0 in favor of {@link #getMethod()} and
4343
* {@link HttpMethod#name()}
4444
*/
4545
@Deprecated

0 commit comments

Comments
 (0)