-
Notifications
You must be signed in to change notification settings - Fork 184
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
Modify to not use URLEncodedUtils #999
Modify to not use URLEncodedUtils #999
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some basic tests for the public method?
7d546c9
to
2a4b9b5
Compare
This works for me. Let's add a line to CHANGELOG? This fixes a bug. You can say "Fix java.lang.NoSuchMethodError: org.apache.http.client.utils.URLEncodedUtils.formatSegments w/o httpclient" or something like that. |
Thank you @AntCode97 , I think we only are missing entry in CHANGELOG.md under [Unreleased 2.x] section, could you please add one? Thank you. |
Okay. I've added it. |
@AntCode97 my apologies, there are conflicts and and DCO check is failing |
b0d800c
to
0dcf634
Compare
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
Signed-off-by: AntCode97 <dbswns97@gmail.com>
0dcf634
to
cdf7840
Compare
Oh, I forgot about that, all fixed. |
@dblock all yours :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AntCode97 Thank you!
It solves the problem so let's merge.
I dislike the fact that we're using reflection very much. I would have much rather preferred either a neutral implementation or a change in class hierarchy that ends up calling the encode method in the right library. Since I'm only the talking head I opened #1008. Maybe I'll get to it or maybe you or @reta feel like a challenge :)
* modify to not use URLEncodedUtils Signed-off-by: AntCode97 <dbswns97@gmail.com> * add a license header Signed-off-by: AntCode97 <dbswns97@gmail.com> * add pathEncoder test Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use ByteBuffer in encodeBytes method Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use URLEncoder Signed-off-by: AntCode97 <dbswns97@gmail.com> * delete PathEncoder Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use URLEncodedUtils per version per Classpath Signed-off-by: AntCode97 <dbswns97@gmail.com> * fix to use MethodHandle instead of reflection Signed-off-by: AntCode97 <dbswns97@gmail.com> * add CHANGELOG.md Signed-off-by: AntCode97 <dbswns97@gmail.com> --------- Signed-off-by: AntCode97 <dbswns97@gmail.com>
* modify to not use URLEncodedUtils Signed-off-by: AntCode97 <dbswns97@gmail.com> * add a license header Signed-off-by: AntCode97 <dbswns97@gmail.com> * add pathEncoder test Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use ByteBuffer in encodeBytes method Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use URLEncoder Signed-off-by: AntCode97 <dbswns97@gmail.com> * delete PathEncoder Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use URLEncodedUtils per version per Classpath Signed-off-by: AntCode97 <dbswns97@gmail.com> * fix to use MethodHandle instead of reflection Signed-off-by: AntCode97 <dbswns97@gmail.com> * add CHANGELOG.md Signed-off-by: AntCode97 <dbswns97@gmail.com> --------- Signed-off-by: AntCode97 <dbswns97@gmail.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
* modify to not use URLEncodedUtils Signed-off-by: AntCode97 <dbswns97@gmail.com> * add a license header Signed-off-by: AntCode97 <dbswns97@gmail.com> * add pathEncoder test Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use ByteBuffer in encodeBytes method Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use URLEncoder Signed-off-by: AntCode97 <dbswns97@gmail.com> * delete PathEncoder Signed-off-by: AntCode97 <dbswns97@gmail.com> * modify to use URLEncodedUtils per version per Classpath Signed-off-by: AntCode97 <dbswns97@gmail.com> * fix to use MethodHandle instead of reflection Signed-off-by: AntCode97 <dbswns97@gmail.com> * add CHANGELOG.md Signed-off-by: AntCode97 <dbswns97@gmail.com> --------- Signed-off-by: AntCode97 <dbswns97@gmail.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
* modify to not use URLEncodedUtils * add a license header * add pathEncoder test * modify to use ByteBuffer in encodeBytes method * modify to use URLEncoder * delete PathEncoder * modify to use URLEncodedUtils per version per Classpath * fix to use MethodHandle instead of reflection * add CHANGELOG.md --------- Signed-off-by: AntCode97 <dbswns97@gmail.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: AntCode97 <50140266+AntCode97@users.noreply.github.com>
…h-project#1012) * modify to not use URLEncodedUtils * add a license header * add pathEncoder test * modify to use ByteBuffer in encodeBytes method * modify to use URLEncoder * delete PathEncoder * modify to use URLEncodedUtils per version per Classpath * fix to use MethodHandle instead of reflection * add CHANGELOG.md --------- Signed-off-by: AntCode97 <dbswns97@gmail.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: AntCode97 <50140266+AntCode97@users.noreply.github.com>
* modify to not use URLEncodedUtils * add a license header * add pathEncoder test * modify to use ByteBuffer in encodeBytes method * modify to use URLEncoder * delete PathEncoder * modify to use URLEncodedUtils per version per Classpath * fix to use MethodHandle instead of reflection * add CHANGELOG.md --------- Signed-off-by: AntCode97 <dbswns97@gmail.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: AntCode97 <50140266+AntCode97@users.noreply.github.com>
Description
SimpleEndpoint uses org.apache.hc.core5.net.URLEncodedUtils, but we deprecated it and modified it to use our own implementation of pathEncoder.
This allows us to remove the dependency on HttpClient.
I've referenced URLEncodedUtils and made it work exactly the same, optimizing it by removing parameters that aren't needed.
Issues Resolved
Fixes #998
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.