You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wanghbxxxx (GitHub)" <gi...@apache.org> on 2019/01/31 06:34:25 UTC

[GitHub] [incubator-dubbo] wanghbxxxx opened pull request #3405: refactor condition router

## What is the purpose of the change
to reduce Cognitive complexity

## Brief changelog

refactor inner class MatchPair: use jdk1.8 stream 
refactor matchCondition method: extract method: getConditionValue

## Verifying this change

XXXXX

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

- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) 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 integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] 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](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3405 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] wanghbxxxx commented on issue #3405: refactor condition router

Posted by "wanghbxxxx (GitHub)" <gi...@apache.org>.
> 
> 我的意思是是否可以按照模块的来进行重构或者优化

我刚刚开始尝试提交代码,看到哪需要就重构一下,谢谢你的建议

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3405 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] wanghbxxxx closed pull request #3405: refactor condition router

Posted by "wanghbxxxx (GitHub)" <gi...@apache.org>.
[ pull request closed by wanghbxxxx ]

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3405 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] wanghbxxxx commented on issue #3405: refactor condition router

Posted by "wanghbxxxx (GitHub)" <gi...@apache.org>.
> Whether to consider refactoring by module

对不起,我英文不太好,不明白这句话是什么意思?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3405 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] codecov-io commented on issue #3405: refactor condition router

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3405?src=pr&el=h1) Report
> Merging [#3405](https://codecov.io/gh/apache/incubator-dubbo/pull/3405?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/713a3ea96ded46ec54571a55d3370420f1e12455?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `72.72%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3405?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##             master    #3405      +/-   ##
============================================
- Coverage     63.84%   63.82%   -0.03%     
  Complexity       71       71              
============================================
  Files           661      661              
  Lines         28514    28496      -18     
  Branches       4793     4786       -7     
============================================
- Hits          18205    18187      -18     
- Misses         8095     8098       +3     
+ Partials       2214     2211       -3
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3405?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../rpc/cluster/router/condition/ConditionRouter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL2NvbmRpdGlvbi9Db25kaXRpb25Sb3V0ZXIuamF2YQ==) | `64.28% <72.72%> (-3.77%)` | `0 <0> (ø)` | |
| [...ache/dubbo/remoting/transport/AbstractChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RDaGFubmVsLmphdmE=) | `75% <0%> (-12.5%)` | `0% <0%> (ø)` | |
| [...che/dubbo/remoting/transport/mina/MinaChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L21pbmEvTWluYUNoYW5uZWwuamF2YQ==) | `43.42% <0%> (-10.53%)` | `0% <0%> (ø)` | |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvZXh0ZW5zaW9uL1NwcmluZ0V4dGVuc2lvbkZhY3RvcnkuamF2YQ==) | `78.04% <0%> (-7.32%)` | `0% <0%> (ø)` | |
| [.../java/org/apache/dubbo/config/ReferenceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWZlcmVuY2VDb25maWcuamF2YQ==) | `57.89% <0%> (+0.37%)` | `0% <0%> (ø)` | :arrow_down: |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `81.1% <0%> (+1.96%)` | `0% <0%> (ø)` | :arrow_down: |
| [...c/main/java/org/apache/dubbo/rpc/RpcException.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9ScGNFeGNlcHRpb24uamF2YQ==) | `86.2% <0%> (+3.44%)` | `0% <0%> (ø)` | :arrow_down: |
| [.../apache/dubbo/remoting/transport/AbstractPeer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3405/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RQZWVyLmphdmE=) | `67.39% <0%> (+8.69%)` | `0% <0%> (ø)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3405?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3405?src=pr&el=footer). Last update [713a3ea...206649e](https://codecov.io/gh/apache/incubator-dubbo/pull/3405?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3405 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] CrazyHZM commented on issue #3405: refactor condition router

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
Whether to consider refactoring by module

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3405 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] CrazyHZM commented on issue #3405: refactor condition router

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
> > Whether to consider refactoring by module
> 
> 对不起,我英文不太好,不明白这句话是什么意思?

我的意思是是否可以按照模块的来进行重构或者优化

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3405 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org