-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Deprecate HttpStatus 103 CHECKPOINT in favor of new EARLY_HINTS #29816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate HttpStatus 103 CHECKPOINT in favor of new EARLY_HINTS #29816
Conversation
This commit takes rfc8297 into account and introduces a newer code 103 HttpStatus value which uses `Early Hints` as the more correct reason phrase, deprecating the outdated `CHECKPOINT` enum value for 103. Additionally: - `HttpStatus.valueOf(103)` will return the new enum value - `HttpStatusCode#isSameCodeAs(HttpStatusCode)` is introduced to ease comparison of deprecated enums vs their newer counterparts (or any instance of a more generic `HttpStatusCode`) by comparing the integer `value()` - `HttpStatusTests` covers the new deprecation as well as the three previously deprecated codes, including a check with the above new method to ensure they have comparable integer values Supersedes and Closes spring-projectsgh-27960
LGTM! |
Good to know. I wonder if that should be a candidate for backport. I guess if we decided in favor of backport, the |
Sticking to 6.0 is fine I think. Backporting deprecations that late in the 5.x generation is not useful. |
Perfect. I've updated the I see a lot of occurrences of the annotation without any params (351 vs 182), and only 39 matches with |
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 takes rfc8297 into account and introduces a newer code 103
HttpStatus value which uses
Early Hints
as the more correct reasonphrase, deprecating the outdated
CHECKPOINT
enum value for 103.Additionally:
HttpStatus.valueOf(103)
will return the new enum valueHttpStatusCode#isSameCodeAs(HttpStatusCode)
is introduced to easecomparison of deprecated enums vs their newer counterparts (or any
instance of a more generic
HttpStatusCode
) by comparing the integervalue()
HttpStatusTests
covers the new deprecation as well as the threepreviously deprecated codes, including a check with the above new
method to ensure they have comparable integer values
Supersedes and Closes gh-27960