Merge branch '6.1.x'
This commit is contained in:
@@ -67,6 +67,7 @@ abstract class AbstractServerResponse extends ErrorHandlingServerResponse {
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
@SuppressWarnings("removal")
|
||||
public int rawStatusCode() {
|
||||
return this.statusCode.value();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ final class CompletedAsyncServerResponse implements AsyncServerResponse {
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
@SuppressWarnings("removal")
|
||||
public int rawStatusCode() {
|
||||
return this.serverResponse.rawStatusCode();
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ final class DefaultAsyncServerResponse extends ErrorHandlingServerResponse imple
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
@SuppressWarnings("removal")
|
||||
public int rawStatusCode() {
|
||||
return delegate(ServerResponse::rawStatusCode);
|
||||
}
|
||||
|
||||
@@ -68,9 +68,9 @@ public interface ServerResponse {
|
||||
/**
|
||||
* Return the status code of this response as integer.
|
||||
* @return the status as an integer
|
||||
* @deprecated as of 6.0, in favor of {@link #statusCode()}
|
||||
* @deprecated in favor of {@link #statusCode()}, for removal in 7.0
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
@Deprecated(since = "6.0", forRemoval = true)
|
||||
int rawStatusCode();
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,7 +66,7 @@ class DefaultEntityResponseBuilderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings("removal")
|
||||
void status() {
|
||||
String body = "foo";
|
||||
EntityResponse<String> result =
|
||||
|
||||
@@ -55,7 +55,7 @@ class DefaultServerResponseBuilderTests {
|
||||
static final ServerResponse.Context EMPTY_CONTEXT = Collections::emptyList;
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings("removal")
|
||||
void status() {
|
||||
ServerResponse response = ServerResponse.status(HttpStatus.CREATED).build();
|
||||
assertThat(response.statusCode()).isEqualTo(HttpStatus.CREATED);
|
||||
|
||||
Reference in New Issue
Block a user