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
Make 'none+' serialization format as optional. #2241
Conversation
…return 'none+' if present.
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.
Thanks!
core/src/main/java/com/linecorp/armeria/client/AbstractClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/AbstractClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/AbstractClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientBuilderParams.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientBuilderParams.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientBuilderParams.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientBuilderParams.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #2241 +/- ##
============================================
+ Coverage 73.5% 73.54% +0.03%
- Complexity 9747 9766 +19
============================================
Files 849 852 +3
Lines 37575 37628 +53
Branches 4616 4631 +15
============================================
+ Hits 27620 27674 +54
+ Misses 7587 7578 -9
- Partials 2368 2376 +8
Continue to review full report at Codecov.
|
core/src/main/java/com/linecorp/armeria/client/HttpClientBuilder.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
Done. Removed in ClientBuilderTest too. |
We had chat and decided to need more discussion on this issue. I filed an issue for that. #2247 |
That is a nice idea! Removing |
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/test/java/com/linecorp/armeria/client/ClientBuilderTest.java
Outdated
Show resolved
Hide resolved
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.
LGTM once others' comments are addressed.
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
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.
Thanks!
core/src/main/java/com/linecorp/armeria/client/AbstractClientFactory.java
Show resolved
Hide resolved
core/src/main/java/com/linecorp/armeria/client/DefaultClientFactory.java
Outdated
Show resolved
Hide resolved
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.
Great work + thanks for the fast feedback! 👍 @rmohta
🎉 Thanks a lot, @rmohta! |
Motivation: Improve API UX, by not forcing application to provide none+ serialization format. Modifications: - Update `Scheme.parse()` and `tryParse()` to default to `none+`, if no serialization format is passed. - Update `DefaultClientFactory` to normalize URI by removing `none+` from URI scheme. Result: - Fixes line#2219
Motivation:
Improve API UX, by not forcing application to provide none+ serialization format.
Modifications:
Scheme.parse()
andtryParse()
to default tonone+
, if no serialization format is passed.DefaultClientFactory
to normalize URI by removingnone+
from URI scheme.Result:
none+
and return URIs withoutnone+
#2219