Skip to content

optimize : put single-quotes around ':' to use the faster "indexOf(char)" method.#5585

Merged
chickenlj merged 1 commit intoapache:masterfrom
ggezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz:patch-14
Feb 1, 2020
Merged

optimize : put single-quotes around ':' to use the faster "indexOf(char)" method.#5585
chickenlj merged 1 commit intoapache:masterfrom
ggezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz:patch-14

Conversation

@ggezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Copy link
Copy Markdown

What is the purpose of the change

Use faster indexOf method

Brief changelog

1.dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/parser/ConfigParser.java

Verifying this change

Passed unit tests

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #5585 into master will decrease coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #5585      +/-   ##
============================================
- Coverage     61.29%   61.18%   -0.11%     
+ Complexity      424      421       -3     
============================================
  Files           922      922              
  Lines         37502    37502              
  Branches       5431     5431              
============================================
- Hits          22985    22947      -38     
- Misses        12042    12070      +28     
- Partials       2475     2485      +10
Impacted Files Coverage Δ Complexity Δ
.../rpc/cluster/configurator/parser/ConfigParser.java 87.25% <100%> (ø) 0 <0> (ø) ⬇️
...rg/apache/dubbo/remoting/utils/PayloadDropper.java 30.76% <0%> (-15.39%) 0% <0%> (ø)
...va/org/apache/dubbo/remoting/TimeoutException.java 22.22% <0%> (-11.12%) 0% <0%> (ø)
...che/dubbo/remoting/transport/mina/MinaChannel.java 43.42% <0%> (-10.53%) 16% <0%> (-1%)
.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java 79.16% <0%> (-8.34%) 0% <0%> (ø)
...dubbo/remoting/exchange/support/DefaultFuture.java 79.27% <0%> (-7.21%) 0% <0%> (ø)
.../dubbo/remoting/transport/netty4/NettyChannel.java 61.38% <0%> (-6.94%) 0% <0%> (ø)
...e/dubbo/remoting/transport/netty/NettyChannel.java 55.68% <0%> (-4.55%) 20% <0%> (-1%)
.../apache/dubbo/remoting/transport/AbstractPeer.java 58.69% <0%> (-4.35%) 0% <0%> (ø)
...he/dubbo/remoting/transport/netty/NettyServer.java 70.17% <0%> (-3.51%) 8% <0%> (-1%)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b5dc6e...b53a3bf. Read the comment docs.

@chickenlj chickenlj merged commit 0438ee7 into apache:master Feb 1, 2020
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.

4 participants