Skip to content
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

Remove APIs deprecated for removal in 6.1 #29449

Closed
10 tasks done
sbrannen opened this issue Nov 8, 2022 · 6 comments
Closed
10 tasks done

Remove APIs deprecated for removal in 6.1 #29449

sbrannen opened this issue Nov 8, 2022 · 6 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Nov 8, 2022

Remove APIs that have been "deprecated for removal in 6.1".

Candidates

  • methods in org.springframework.util.Assert
  • org.springframework.core.task.support.ConcurrentExecutorAdapter
  • org.springframework.test.web.reactive.server.ExchangeResult.getRawStatusCode()
  • org.springframework.http.HttpMethod.resolve(String)
  • org.springframework.http.HttpRequest.getMethodValue()
  • org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setReadTimeout(int)
  • org.springframework.http.client.reactive.ClientHttpResponse.getRawStatusCode()
  • methods in org.springframework.jdbc.datasource.init.ScriptUtils
  • constructors in org.springframework.web.HttpRequestMethodNotSupportedException
  • org.springframework.web.reactive.function.client.ClientResponse.rawStatusCode()
@sbrannen sbrannen added this to the 6.1.x milestone Nov 8, 2022
@sbrannen sbrannen changed the title Remove deprecated APIs Remove APIs deprecated for removal in 6.1 Nov 8, 2022
@jhoeller jhoeller added the type: task A general task label Nov 23, 2022
@jhoeller jhoeller modified the milestones: 6.1.x, 6.1.0-M1 Jan 10, 2023
@sbrannen sbrannen self-assigned this Jan 23, 2023
sbrannen added a commit that referenced this issue Apr 19, 2023
This is the first commit that removes deprecated APIs.

Subsequent commits will remove additional deprecated APIs.

See gh-29449
@sbrannen
Copy link
Member Author

sbrannen commented Jun 6, 2023

I made an initial pass to remove deprecated APIs in af170f6 and 7df2e2a.

The team will make an additional pass in conjunction with #30604.

In light of that, I am closing this issue.

@GregTreat
Copy link

How should we handle interactions with servers that return non-standard HTTP status codes?

Previously, getRawStatusCode() was a reliable way to retrieve the raw status code without failing. However, now getStatusCode() throws an exception if the response contains an unknown status code, making it problematic when dealing with less strict servers.

What’s the recommended approach to handle this scenario in Spring 6+?

@bclozel
Copy link
Member

bclozel commented Feb 13, 2025

@GregTreat Have you tried applying the advice in the deprecation notice? Using getStatusCode should work for both standard and non-standard status codes. Can you elaborate on the exception thrown, and provide a stacktrace?

@GregTreat
Copy link

@bclozel Maybe I missed advice in the deprecation notice. Can you please point me.

@GregTreat
Copy link

@bclozel Oh, sorry! It looks like I wasn't up to date. In version 6.x, the failures no longer occur.

@sbrannen
Copy link
Member Author

Maybe I missed advice in the deprecation notice. Can you please point me.

It's in the Javadoc: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/client/ClientHttpResponse.html#getRawStatusCode()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

4 participants