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
This commit is contained in:
Johnny Lim
2023-01-18 22:50:02 +09:00
committed by GitHub
parent 9ebd1e8d64
commit 2fe75c1a24
4 changed files with 8 additions and 4 deletions

View File

@@ -51,8 +51,9 @@ public enum HttpStatus implements HttpStatusCode {
*/
PROCESSING(102, Series.INFORMATIONAL, "Processing"),
/**
* {code 103 Early Hints}.
* {@code 103 Early Hints}.
* @see <a href="https://tools.ietf.org/html/rfc8297">An HTTP Status Code for Indicating Hints</a>
* @since 6.0.5
*/
EARLY_HINTS(103, Series.INFORMATIONAL, "Early Hints"),
/**
@@ -61,7 +62,7 @@ public enum HttpStatus implements HttpStatusCode {
* resumable POST/PUT HTTP requests in HTTP/1.0</a>
* @deprecated in favor of {@link #EARLY_HINTS} which will be returned from {@code HttpStatus.valueOf(103)}
*/
@Deprecated(since = "6.0")
@Deprecated(since = "6.0.5")
CHECKPOINT(103, Series.INFORMATIONAL, "Checkpoint"),
// 2xx Success

View File

@@ -81,7 +81,8 @@ public sealed interface HttpStatusCode extends Serializable permits DefaultHttpS
* <p>Useful for comparisons that take deprecated aliases into account or compare arbitrary implementations
* of {@code HttpStatusCode} (e.g. in place of {@link HttpStatus#equals(Object) HttpStatus enum equality}).
* @param other the other {@code HttpStatusCode} to compare
* @return true if the two {@code HttpStatusCode} share the same integer {@code value()}, false otherwise
* @return true if the two {@code HttpStatusCode} objects share the same integer {@code value()}, false otherwise
* @since 6.0.5
*/
default boolean isSameCodeAs(HttpStatusCode other) {
return value() == other.value();