Skip to content

Apply ClientHttpResponse#getRawStatusCode() migration as of Spring Framework 6.0#1031

Merged
timtebeek merged 1 commit into
mainfrom
wire-clienthttpresponse-getrawstatuscode-into-6_0
May 29, 2026
Merged

Apply ClientHttpResponse#getRawStatusCode() migration as of Spring Framework 6.0#1031
timtebeek merged 1 commit into
mainfrom
wire-clienthttpresponse-getrawstatuscode-into-6_0

Conversation

@timtebeek
Copy link
Copy Markdown
Member

@timtebeek timtebeek commented May 29, 2026

ClientHttpResponse#getRawStatusCode() was deprecated and its sibling getStatusCode() changed its return type from HttpStatus to HttpStatusCode in Spring Framework 6.0. The recipe that handles this, MigrateClientHttpResponseGetRawStatusCodeMethod, was only wired into UpgradeSpringFramework_6_2, so applications migrating to 6.0 (the version that actually introduced the change) did not get the fix.

This moves the recipe into UpgradeSpringFramework_6_0, alongside the related MigrateResponseStatusException migration. It is still applied for 6.1 and 6.2 since those chain through UpgradeSpringFramework_6_0, so the direct entry in UpgradeSpringFramework_6_2 is removed to avoid duplication.

  • Reported via customer feedback (moderneinc/customer-requests#2462).

…amework 6.0

The deprecation and HttpStatusCode return-type change for
ClientHttpResponse#getRawStatusCode() landed in Spring Framework 6.0, but
MigrateClientHttpResponseGetRawStatusCodeMethod was only wired into
UpgradeSpringFramework_6_2. Move it to UpgradeSpringFramework_6_0 so the fix is
applied for anyone migrating to 6.0; it is still inherited by 6.1 and 6.2 via
the upgrade chain.
@github-project-automation github-project-automation Bot moved this from In Progress to Ready to Review in OpenRewrite May 29, 2026
@timtebeek timtebeek merged commit 27e8802 into main May 29, 2026
1 check passed
@timtebeek timtebeek deleted the wire-clienthttpresponse-getrawstatuscode-into-6_0 branch May 29, 2026 11:55
@github-project-automation github-project-automation Bot moved this from Ready to Review to Done in OpenRewrite May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants