Skip to content

Prevent changing of org.apache.http.params package (as there's no generic migration possible) and add a comment to that effect - #96

Merged
timtebeek merged 1 commit into
mainfrom
1196-comment-on-http-params-imports-or-usage
Aug 12, 2025
Merged

Prevent changing of org.apache.http.params package (as there's no generic migration possible) and add a comment to that effect#96
timtebeek merged 1 commit into
mainfrom
1196-comment-on-http-params-imports-or-usage

Conversation

@steve-aom-elliott

Copy link
Copy Markdown
Contributor

What's changed?

Prevented changing of the org.apache.http.params package and added a comment to the first relevant import indicating that manual migration will be necessary.

What's your motivation?

org.apache.http.params.HttpParams, along with all other classes in the org.apache.http.params package have been deprecated since at least version 4.3 of the Apache Http Client library (seen here). In their stead, there are a number of configuration classes that would be used instead, but they are context specific to what content was being put into the HttpParams instance and can't be easily adequately inferred in many usages from a single codebase. Since we can't migrate it, it would be best to prevent the package being changed so it can more easily be found through manual effort. This PR prevents the package from change and also adds a comment suggesting that a manual change must be undertaken, as we cannot automatically migrate it.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@steve-aom-elliott steve-aom-elliott self-assigned this Aug 12, 2025
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Aug 12, 2025
@steve-aom-elliott steve-aom-elliott changed the title Prevent chaning of org.apache.http.params package (as there's no generic migration possible) and add a comment to that effect Prevent changing of org.apache.http.params package (as there's no generic migration possible) and add a comment to that effect Aug 12, 2025
…eneric migration possible) and add a comment to that effect
@steve-aom-elliott
steve-aom-elliott force-pushed the 1196-comment-on-http-params-imports-or-usage branch from 4355f34 to b0ab3f1 Compare August 12, 2025 17:58
@steve-aom-elliott steve-aom-elliott moved this from In Progress to Ready to Review in OpenRewrite Aug 12, 2025
@timtebeek
timtebeek merged commit 17a78bd into main Aug 12, 2025
2 checks passed
@timtebeek
timtebeek deleted the 1196-comment-on-http-params-imports-or-usage branch August 12, 2025 18:03
@github-project-automation github-project-automation Bot moved this from Ready to Review to Done in OpenRewrite Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants