Skip to content

use Stream to refactor some code#5861

Merged
htynkn merged 1 commit intoapache:masterfrom
Huangxuny1:huangxunyi/refactor
Mar 21, 2020
Merged

use Stream to refactor some code#5861
htynkn merged 1 commit intoapache:masterfrom
Huangxuny1:huangxunyi/refactor

Conversation

@Huangxuny1
Copy link
Copy Markdown
Contributor

What is the purpose of the change

Simplified code use Java8 Stream

Brief changelog

M dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/DoubleArrayMerger.java
M dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/IntArrayMerger.java
M dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/ListMerger.java
M dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/LongArrayMerger.java
M dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MapMerger.java
M dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/SetMerger.java


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 #5861 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #5861      +/-   ##
===========================================
- Coverage     61.24%   61.2%   -0.05%     
+ Complexity      499     496       -3     
===========================================
  Files           981     981              
  Lines         39142   39189      +47     
  Branches       5643    5647       +4     
===========================================
+ Hits          23973   23984      +11     
- Misses        12542   12573      +31     
- Partials       2627    2632       +5
Impacted Files Coverage Δ Complexity Δ
...rg/apache/dubbo/rpc/cluster/merger/ListMerger.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...pache/dubbo/rpc/cluster/merger/IntArrayMerger.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...ache/dubbo/rpc/cluster/merger/LongArrayMerger.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...org/apache/dubbo/rpc/cluster/merger/MapMerger.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...org/apache/dubbo/rpc/cluster/merger/SetMerger.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...he/dubbo/rpc/cluster/merger/DoubleArrayMerger.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...che/dubbo/remoting/transport/mina/MinaChannel.java 39.47% <0%> (-11.85%) 15% <0%> (-2%)
...he/dubbo/common/threadpool/ThreadlessExecutor.java 52.17% <0%> (-10.87%) 0% <0%> (ø)
.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java 62.06% <0%> (-10.35%) 0% <0%> (ø)
...ng/exchange/support/header/HeartbeatTimerTask.java 73.68% <0%> (-5.27%) 0% <0%> (ø)
... and 12 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 61d1ba7...223e2d5. Read the comment docs.

@htynkn htynkn merged commit 062e543 into apache:master Mar 21, 2020
@Huangxuny1 Huangxuny1 deleted the huangxunyi/refactor branch April 2, 2020 14:27
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.20%. Comparing base (61d1ba7) to head (223e2d5).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5861      +/-   ##
============================================
- Coverage     61.24%   61.20%   -0.05%     
+ Complexity      499      496       -3     
============================================
  Files           981      981              
  Lines         39142    39189      +47     
  Branches       5643     5647       +4     
============================================
+ Hits          23973    23984      +11     
- Misses        12542    12573      +31     
- Partials       2627     2632       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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