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

HttpStatus is only imported from org.apache.http #3741

Merged

Conversation

prabhask5
Copy link
Contributor

@prabhask5 prabhask5 commented Nov 19, 2023

Description

Accounts for refactor of HttpStatus classes from hc.core5.http to just http by adding checkstyle test, and manually refactoring all current occurrences of the illegal import. Additionally updated spotlessApply to make the refactor automatic on future cases of illegal import.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Bug fix/refactor

  • Why these changes are required?
  • What is the old behavior before changes and new behavior after changes?

Ideally nothing.

Issues Resolved

Is this a backport? If so, please add backport PR # and/or commits #
No.

Testing

Tests have been modified and should work before merging.

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Prabhas Kurapati <[email protected]>
@prabhask5
Copy link
Contributor Author

prabhask5 commented Nov 19, 2023

@DarshitChanpura @peternied In this PR I only refactored the HttpStatus import, please let me know if there's areas that should not be refactored/changed to something else. Based on @peternied 's advice in the previous PR I'm going to have this PR only for HttpStatus refactors, and when it's merged I'll play around with the Header refactors in another PR and find a way to do so without the errors I've been getting. Thanks!

@prabhask5 prabhask5 changed the title [BUG-3581] [Code Style] HttpStatus & Headers should not be imported from org.apache.hc.core5.http [BUG-3581] [Code Style] HttpStatus & Headers should not be imported from org.apache.hc.core5.http - HttpStatus Refactor Only Nov 19, 2023
Copy link

codecov bot commented Nov 19, 2023

Codecov Report

Merging #3741 (ccf8cbd) into main (4496440) will decrease coverage by 0.03%.
Report is 2 commits behind head on main.
The diff coverage is n/a.

❗ Current head ccf8cbd differs from pull request most recent head 7aa8208. Consider uploading reports for the commit 7aa8208 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3741      +/-   ##
==========================================
- Coverage   65.23%   65.20%   -0.03%     
==========================================
  Files         297      297              
  Lines       21129    21129              
  Branches     3451     3451              
==========================================
- Hits        13783    13778       -5     
- Misses       5647     5651       +4     
- Partials     1699     1700       +1     

see 1 file with indirect coverage changes

@peternied peternied changed the title [BUG-3581] [Code Style] HttpStatus & Headers should not be imported from org.apache.hc.core5.http - HttpStatus Refactor Only HttpStatus is only imported from org.apache.http Nov 21, 2023
@peternied peternied merged commit 26617e2 into opensearch-project:main Nov 21, 2023
74 of 75 checks passed
prabhask5 added a commit to prabhask5/opensearch-security that referenced this pull request Jan 11, 2024
@prabhask5 prabhask5 deleted the pk-refactor-illegal-core5-imports branch July 10, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants