You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "satansk (GitHub)" <gi...@apache.org> on 2018/11/15 14:05:39 UTC

[GitHub] [incubator-dubbo] satansk opened pull request #2790: Improvement on Parameters and CollectionUtils

## What is the purpose of the change

Use `CollectionUtils.toStringMap` to reduce duplicate code in `Parameters`, and use Java 8 type inference for collections.

## Brief changelog

XXXXX

## 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) filed 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.
- [x] 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` & `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/2790 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #2790: Improvement on Parameters and CollectionUtils

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

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

```diff
@@            Coverage Diff             @@
##           master    #2790      +/-   ##
==========================================
- Coverage    63.6%   63.54%   -0.06%     
==========================================
  Files         577      577              
  Lines       25935    25929       -6     
  Branches     4544     4541       -3     
==========================================
- Hits        16495    16477      -18     
- Misses       7283     7291       +8     
- Partials     2157     2161       +4
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/2790?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../main/java/org/apache/dubbo/common/Parameters.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vUGFyYW1ldGVycy5qYXZh) | `0% <0%> (ø)` | :arrow_up: |
| [...org/apache/dubbo/common/utils/CollectionUtils.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvQ29sbGVjdGlvblV0aWxzLmphdmE=) | `87.37% <100%> (ø)` | :arrow_up: |
| [...ache/dubbo/remoting/transport/AbstractChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RDaGFubmVsLmphdmE=) | `75% <0%> (-12.5%)` | :arrow_down: |
| [...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9maWx0ZXIvQWN0aXZlTGltaXRGaWx0ZXIuamF2YQ==) | `77.77% <0%> (-11.12%)` | :arrow_down: |
| [...he/dubbo/remoting/transport/netty/NettyClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eUNsaWVudC5qYXZh) | `72.88% <0%> (-8.48%)` | :arrow_down: |
| [...he/dubbo/remoting/transport/netty/NettyServer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eVNlcnZlci5qYXZh) | `67.85% <0%> (-3.58%)` | :arrow_down: |
| [...e/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eUNoYW5uZWwuamF2YQ==) | `58.82% <0%> (-3.53%)` | :arrow_down: |
| [...pache/dubbo/remoting/transport/AbstractClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RDbGllbnQuamF2YQ==) | `65.94% <0%> (-2.17%)` | :arrow_down: |
| [...e/dubbo/registry/integration/RegistryProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9SZWdpc3RyeVByb3RvY29sLmphdmE=) | `81.25% <0%> (-1.93%)` | :arrow_down: |
| [...bo/remoting/transport/netty/NettyCodecAdapter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eUNvZGVjQWRhcHRlci5qYXZh) | `54.68% <0%> (+1.56%)` | :arrow_up: |
| ... and [2 more](https://codecov.io/gh/apache/incubator-dubbo/pull/2790/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/2790?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/2790?src=pr&el=footer). Last update [38a6511...58de88e](https://codecov.io/gh/apache/incubator-dubbo/pull/2790?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/2790 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] carryxyh closed pull request #2790: Improvement on Parameters and CollectionUtils

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

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


[GitHub] [incubator-dubbo] carryxyh commented on issue #2790: Improvement on Parameters and CollectionUtils

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Seems like Parameters.java is deprecated and never init in dubbo now.
But I think a little optimization is also good.
LGTM.

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