-
Notifications
You must be signed in to change notification settings - Fork 358
[BUG] [Code Style] HttpStatus & Headers should not be imported from org.apache.hc.core5.http #3581
Copy link
Copy link
Closed
Labels
CCICollege Contributor InitiativeCollege Contributor InitiativebugSomething isn't workingSomething isn't workinggood first issueThese are recommended starting points for newcomers looking to make their first contributions.These are recommended starting points for newcomers looking to make their first contributions.triagedIssues labeled as 'Triaged' have been reviewed and are deemed actionable.Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Description
What is the bug?
In this codebase on main, we are using a newer version of the apache http client; however, in our currently supported major version, 2.x we don't use this version of the http client and cannot due to dependency conflicts. Any changes that reference org.apache.hc.core5.http.HttpStatus or org.apache.hc.core5.http.Header cannot be backported without manual conflict resolution.
What is the expected behavior?
Our code hygiene workflows should catch usages of these namespace and prevent them from being checked into the codebase. It would be a bonus to fixing the issue by switching to org.apache.http.HttpStatus & org.apache.http.Header which will work in both the 2.x and mainline branches or provide the specific recommendation.
Exit Criteria
- Add a new checkstyle or spotless rule that prevents the use of the
org.apache.hc.core5.httppackage for HttpStatus and Header classes. - Fix all existing references to use
org.apache.http.HttpStatus&org.apache.http.Header - [Optional] Update
spotlessApplyso that it can switch the references to the preferred replacement OR have the error message indicate how to resolve the issue by suggesting the correct replacement class.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CCICollege Contributor InitiativeCollege Contributor InitiativebugSomething isn't workingSomething isn't workinggood first issueThese are recommended starting points for newcomers looking to make their first contributions.These are recommended starting points for newcomers looking to make their first contributions.triagedIssues labeled as 'Triaged' have been reviewed and are deemed actionable.Issues labeled as 'Triaged' have been reviewed and are deemed actionable.