Skip to content

Migrate spring-boot-buildpack-platform to HttpClient 5 #33533

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

Closed
scottfrederick opened this issue Dec 15, 2022 · 3 comments
Closed

Migrate spring-boot-buildpack-platform to HttpClient 5 #33533

scottfrederick opened this issue Dec 15, 2022 · 3 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@scottfrederick
Copy link
Contributor

Apache HttpClient has been superseded by Apache HttpClient 5. The spring-boot-buildpack-platform module still uses HttpClient APIs, and should be migrated to the HttpClient 5 APIs.

@anugrahsinghal
Copy link
Contributor

anugrahsinghal commented Dec 29, 2022

Hey @scottfrederick

I have raised PR #33649 for this.

If you could, please take a look, and if the changes are sufficient, I can make the same for #33534.


The PR #33649 uses mockito feature to mock final class ClosableHttpResponse
but the same can be achieved without mocking the final Class, but needs more changes to the source itself.

I have tried those changes too, and you can find them here anugrahsinghal/spring-boot/gh-33533-no-final-mock if you would like to take a look.

the changes are needed in HttpClientTransport

  • to use HttpClient interface as input to the constructor, instead of CloseableHttpClient which is an abstract class
  • use ClassicHttpResponse in the HttpClientResponse class and in tests

@scottfrederick
Copy link
Contributor Author

scottfrederick commented Dec 29, 2022

@anugrahsinghal I already have the changes for this and for #33534 completed, which is why I marked the issue as assigned to me. We want to wait until Spring Boot 3.1 to make these changes, and we haven't created the branches necessary to start work on 3.1 yet.

@anugrahsinghal
Copy link
Contributor

apologies @scottfrederick
I did not pay attention to the assignee.

Thanks for letting me know :)

@scottfrederick scottfrederick added the status: on-hold We can't start working on this issue yet label Jan 9, 2023
@scottfrederick scottfrederick modified the milestones: 3.1.x, 3.1.0 Jan 23, 2023
@scottfrederick scottfrederick removed the status: on-hold We can't start working on this issue yet label Jan 23, 2023
@scottfrederick scottfrederick modified the milestones: 3.1.0, 3.1.0-M1 Jan 23, 2023
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

2 participants