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

first approach of HttpClient5 migration #397

Merged
merged 7 commits into from
Jul 28, 2023
Merged

first approach of HttpClient5 migration #397

merged 7 commits into from
Jul 28, 2023

Conversation

joanvr
Copy link
Contributor

@joanvr joanvr commented Jul 27, 2023

What's changed?

Added a first approach of Apache Http Client 5 migration. Right now it adds the new dependency coordinates and performs all the obvious mappings between compatible classes changing the namespace.
Some attempts on some Deprecated classes have been done, but probably with some breaking changes right now. Will need more iteration.

What's your motivation?

Spring boot 3 migration requires HttpClient upgrade.
Issue: #300

Anyone you would like to review specifically?

@timtebeek

@joanvr joanvr added enhancement New feature or request recipe Recipe requested boot-3.0 labels Jul 27, 2023
@joanvr joanvr requested a review from timtebeek July 27, 2023 15:07
@joanvr joanvr self-assigned this Jul 27, 2023
@joanvr
Copy link
Contributor Author

joanvr commented Jul 27, 2023

I'm using this document as a support to map 4->5 classes and track deprecations and errors:
https://docs.google.com/spreadsheets/d/1jFKxcDL-kCab_6-bDBweoimLZhKbu755ugxg5A6SJ0E/edit?usp=sharing

@timtebeek
Copy link
Contributor

I'd say a good start; maybe good to complement with just the basics of a unit test before we merge, but otherwise we're mostly testing existing recipes and how they work when combined.

@joanvr joanvr requested a review from timtebeek July 28, 2023 10:51
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start & thanks for adding the test!

Comment on lines 128 to 129
oldFullyQualifiedTypeName: org.apache.hc.client5.http.impl.classic.DefaultHttpClient
newFullyQualifiedTypeName: org.apache.hc.client5.http.impl.classic.CloseableHttpClient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the top one still available? Maybe best not to replace just yet in that case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because if we replace this early, then we might not be able to better target a replacement that introduces try-with-resources later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, it's not available anymore... But I'm thinking on not just facing this "deprecated" issues yet, because in general is not as simple as just changing the type, since usually they don't have the same methods available...

@joanvr joanvr merged commit 0c20814 into main Jul 28, 2023
1 check passed
@joanvr joanvr deleted the recipe/httpclient branch July 28, 2023 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boot-3.0 enhancement New feature or request recipe Recipe requested
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants