Skip to content

Commit 2fe75c1

Browse files
authored
Polish HttpStatus 103 EARLY_HINTS javadocs (#29841)
This commit polishes the EARLY_HINTS javadocs a bit: - fix a typo - fix `since` tags to include the patch version See gh-29816
1 parent 9ebd1e8 commit 2fe75c1

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

spring-test/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,14 @@ public ResultMatcher isProcessing() {
148148
* @see #isEarlyHints()
149149
* @deprecated in favor of {@link #isEarlyHints()}
150150
*/
151-
@Deprecated(since = "6.0")
151+
@Deprecated(since = "6.0.5")
152152
public ResultMatcher isCheckpoint() {
153153
return isEarlyHints();
154154
}
155155

156156
/**
157157
* Assert the response status code is {@code HttpStatus.EARLY_HINTS} (103).
158+
* @since 6.0.5
158159
*/
159160
public ResultMatcher isEarlyHints() {
160161
return matcher(HttpStatus.valueOf(103));

spring-test/src/main/kotlin/org/springframework/test/web/servlet/result/StatusResultMatchersDsl.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ class StatusResultMatchersDsl internal constructor (private val actions: ResultA
125125

126126
/**
127127
* @see StatusResultMatchers.isEarlyHints
128+
* @since 6.0.5
128129
*/
129130
fun isEarlyHints() {
130131
actions.andExpect(matchers.isEarlyHints())

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public enum HttpStatus implements HttpStatusCode {
5151
*/
5252
PROCESSING(102, Series.INFORMATIONAL, "Processing"),
5353
/**
54-
* {code 103 Early Hints}.
54+
* {@code 103 Early Hints}.
5555
* @see <a href="https://tools.ietf.org/html/rfc8297">An HTTP Status Code for Indicating Hints</a>
56+
* @since 6.0.5
5657
*/
5758
EARLY_HINTS(103, Series.INFORMATIONAL, "Early Hints"),
5859
/**
@@ -61,7 +62,7 @@ public enum HttpStatus implements HttpStatusCode {
6162
* resumable POST/PUT HTTP requests in HTTP/1.0</a>
6263
* @deprecated in favor of {@link #EARLY_HINTS} which will be returned from {@code HttpStatus.valueOf(103)}
6364
*/
64-
@Deprecated(since = "6.0")
65+
@Deprecated(since = "6.0.5")
6566
CHECKPOINT(103, Series.INFORMATIONAL, "Checkpoint"),
6667

6768
// 2xx Success

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public sealed interface HttpStatusCode extends Serializable permits DefaultHttpS
8181
* <p>Useful for comparisons that take deprecated aliases into account or compare arbitrary implementations
8282
* of {@code HttpStatusCode} (e.g. in place of {@link HttpStatus#equals(Object) HttpStatus enum equality}).
8383
* @param other the other {@code HttpStatusCode} to compare
84-
* @return true if the two {@code HttpStatusCode} share the same integer {@code value()}, false otherwise
84+
* @return true if the two {@code HttpStatusCode} objects share the same integer {@code value()}, false otherwise
85+
* @since 6.0.5
8586
*/
8687
default boolean isSameCodeAs(HttpStatusCode other) {
8788
return value() == other.value();

0 commit comments

Comments
 (0)