-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Replace String.format() with newly created class OpenApiPathBuilder #3982
Replace String.format() with newly created class OpenApiPathBuilder #3982
Conversation
b2ec7f1
to
d3bafae
Compare
Codecov Report
@@ Coverage Diff @@
## master #3982 +/- ##
============================================
+ Coverage 50.76% 51.04% +0.27%
- Complexity 2468 2479 +11
============================================
Files 475 476 +1
Lines 14600 14681 +81
Branches 1521 1521
============================================
+ Hits 7412 7494 +82
+ Misses 6661 6657 -4
- Partials 527 530 +3
Continue to review full report at Codecov.
|
d3bafae
to
6e2d3bc
Compare
...rc/main/java/com/ctrip/framework/apollo/openapi/client/exception/ApolloOpenApiException.java
Outdated
Show resolved
Hide resolved
...-openapi/src/main/java/com/ctrip/framework/apollo/openapi/client/url/OpenApiPathBuilder.java
Outdated
Show resolved
Hide resolved
6e2d3bc
to
85acf67
Compare
...-openapi/src/main/java/com/ctrip/framework/apollo/openapi/client/url/OpenApiPathBuilder.java
Show resolved
Hide resolved
85acf67
to
744f242
Compare
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, just one nit
.../src/main/java/com/ctrip/framework/apollo/openapi/client/service/AbstractOpenApiService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: WillardHu <wei.hu@daocloud.io>
110aaef
to
260c228
Compare
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
Signed-off-by: WillardHu wei.hu@daocloud.io
What's the purpose of this PR
OpenApiPathBuilder
has better readability, maintainability, and performance. Before modifyingString.format (..)
will be used twice to complete url concatenation.String.format(..)
uses regular expressions to assemble strings, performance is slow.Which issue(s) this PR fixes:
Fixes #
Brief changelog
Replace String.format() with newly created class OpenApiPathBuilder
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.