Skip to content

Commit 186deb7

Browse files
committed
Update deprecation notices on rawStatusCode
Mark for removal where not marked, and set to 7.0 consistently as the target for removal. See gh-33440
1 parent 57cb8c7 commit 186deb7

27 files changed

+36
-36
lines changed

spring-test/src/main/java/org/springframework/test/web/reactive/server/ExchangeResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public HttpStatusCode getStatus() {
179179
/**
180180
* Return the HTTP status code as an integer.
181181
* @since 5.1.10
182-
* @deprecated as of 6.0, in favor of {@link #getStatus()}
182+
* @deprecated in favor of {@link #getStatus()}, for removal in 7.0
183183
*/
184184
@Deprecated(since = "6.0", forRemoval = true)
185185
public int getRawStatusCode() {

spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -25,7 +25,7 @@
2525
*
2626
* @author Arjen Poutsma
2727
* @since 3.1.1
28-
* @deprecated as of 6.0, with no direct replacement; scheduled for removal in 6.2
28+
* @deprecated with no direct replacement; for removal in 6.2
2929
*/
3030
@Deprecated(since = "6.0", forRemoval = true)
3131
public abstract class AbstractClientHttpResponse implements ClientHttpResponse {

spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public interface ClientHttpResponse extends HttpInputMessage, Closeable {
4848
* @throws IOException in case of I/O errors
4949
* @since 3.1.1
5050
* @see #getStatusCode()
51-
* @deprecated as of 6.0, in favor of {@link #getStatusCode()}; scheduled for
52-
* removal in 6.2
51+
* @deprecated in favor of {@link #getStatusCode()}, for removal in 7.0
5352
*/
5453
@Deprecated(since = "6.0", forRemoval = true)
5554
default int getRawStatusCode() throws IOException {

spring-web/src/main/java/org/springframework/http/client/reactive/ClientHttpResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ default String getId() {
5151
* @return the HTTP status as an integer value
5252
* @since 5.0.6
5353
* @see #getStatusCode()
54-
* @deprecated as of 6.0, in favor of {@link #getStatusCode()}
54+
* @deprecated in favor of {@link #getStatusCode()}, for removal in 7.0
5555
*/
5656
@Deprecated(since = "6.0", forRemoval = true)
5757
default int getRawStatusCode() {

spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpResponse.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -115,13 +115,6 @@ public boolean setRawStatusCode(@Nullable Integer statusCode) {
115115
return setStatusCode(statusCode != null ? HttpStatusCode.valueOf(statusCode) : null);
116116
}
117117

118-
@Deprecated
119-
@Override
120-
@Nullable
121-
public Integer getRawStatusCode() {
122-
return (this.statusCode != null ? this.statusCode.value() : null);
123-
}
124-
125118
@Override
126119
public HttpHeaders getHeaders() {
127120
if (this.readOnlyHeaders != null) {

spring-web/src/main/java/org/springframework/http/server/reactive/ReactorNetty2ServerHttpResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public HttpStatusCode getStatusCode() {
7878

7979
@Override
8080
@Deprecated
81+
@SuppressWarnings("removal")
8182
public Integer getRawStatusCode() {
8283
Integer status = super.getRawStatusCode();
8384
return (status != null ? status : this.response.status().code());

spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public HttpStatusCode getStatusCode() {
7777

7878
@Override
7979
@Deprecated
80+
@SuppressWarnings("removal")
8081
public Integer getRawStatusCode() {
8182
Integer status = super.getRawStatusCode();
8283
return (status != null ? status : this.response.status().code());

spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ default boolean setRawStatusCode(@Nullable Integer value) {
6565
* status of the response from the underlying server. The return value may
6666
* be {@code null} if there is no default value from the underlying server.
6767
* @since 5.2.4
68-
* @deprecated as of 6.0, in favor of {@link #getStatusCode()}
68+
* @deprecated in favor of {@link #getStatusCode()}, for removal in 7.0
6969
*/
70-
@Deprecated(since = "6.0")
70+
@Deprecated(since = "6.0", forRemoval = true)
7171
@Nullable
7272
default Integer getRawStatusCode() {
7373
HttpStatusCode httpStatus = getStatusCode();

spring-web/src/main/java/org/springframework/http/server/reactive/ServerHttpResponseDecorator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -74,6 +74,7 @@ public boolean setRawStatusCode(@Nullable Integer value) {
7474
@Override
7575
@Nullable
7676
@Deprecated
77+
@SuppressWarnings("removal")
7778
public Integer getRawStatusCode() {
7879
return getDelegate().getRawStatusCode();
7980
}

spring-web/src/main/java/org/springframework/http/server/reactive/ServletServerHttpResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public HttpStatusCode getStatusCode() {
109109

110110
@Override
111111
@Deprecated
112+
@SuppressWarnings("removal")
112113
public Integer getRawStatusCode() {
113114
Integer status = super.getRawStatusCode();
114115
return (status != null ? status : this.response.getStatus());

0 commit comments

Comments
 (0)