You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "khanimteyaz (GitHub)" <gi...@apache.org> on 2018/12/29 14:03:10 UTC

[GitHub] [incubator-dubbo] khanimteyaz opened pull request #3101: replace hard coded values with constants and small refactor

## What is the purpose of the change

Replace existing hard coded values for dubbo-config below classes

dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractConfig.java
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractMethodConfig.java
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractReferenceConfig.java
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConsumerConfig.java
Along with hard coded value replacement have done small refactoring to use java stream and lambda.

## Brief changelog

Hard coded value replacement of few dubbo-config java classes and small refactoring.


## Verifying this change

XXXXX

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

- [x] Make sure there is a [3100](https://github.com/apache/incubator-dubbo/issues/3100) 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/3101 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] zonghaishang closed pull request #3101: replace hard coded values with constants and small refactor

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

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


[GitHub] [incubator-dubbo] codecov-io commented on issue #3101: replace hard coded values with constants and small refactor

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

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

```diff
@@             Coverage Diff              @@
##             master    #3101      +/-   ##
============================================
- Coverage      63.6%   63.57%   -0.03%     
  Complexity       75       75              
============================================
  Files           653      653              
  Lines         28218    28214       -4     
  Branches       4803     4800       -3     
============================================
- Hits          17947    17936      -11     
- Misses         8002     8012      +10     
+ Partials       2269     2266       -3
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3101?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...c/main/java/org/apache/dubbo/common/Constants.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vQ29uc3RhbnRzLmphdmE=) | `92.85% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...n/java/org/apache/dubbo/config/ConsumerConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9Db25zdW1lckNvbmZpZy5qYXZh) | `92.3% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractReferenceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9BYnN0cmFjdFJlZmVyZW5jZUNvbmZpZy5qYXZh) | `93.75% <100%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...n/java/org/apache/dubbo/config/AbstractConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9BYnN0cmFjdENvbmZpZy5qYXZh) | `79.09% <100%> (+0.64%)` | `0 <0> (ø)` | :arrow_down: |
| [.../org/apache/dubbo/config/AbstractMethodConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9BYnN0cmFjdE1ldGhvZENvbmZpZy5qYXZh) | `94% <75%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...g/apache/dubbo/config/AbstractInterfaceConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9BYnN0cmFjdEludGVyZmFjZUNvbmZpZy5qYXZh) | `75.08% <87.5%> (+0.33%)` | `0 <0> (ø)` | :arrow_down: |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9zcHJpbmcvZXh0ZW5zaW9uL1NwcmluZ0V4dGVuc2lvbkZhY3RvcnkuamF2YQ==) | `80.48% <0%> (-4.88%)` | `0% <0%> (ø)` | |
| [.../dubbo/remoting/transport/netty4/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHk0L05ldHR5Q2hhbm5lbC5qYXZh) | `61.17% <0%> (-4.71%)` | `0% <0%> (ø)` | |
| [.../apache/dubbo/remoting/transport/AbstractPeer.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvQWJzdHJhY3RQZWVyLmphdmE=) | `60.86% <0%> (-4.35%)` | `0% <0%> (ø)` | |
| [...c/main/java/org/apache/dubbo/rpc/RpcException.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9ScGNFeGNlcHRpb24uamF2YQ==) | `82.75% <0%> (-3.45%)` | `0% <0%> (ø)` | |
| ... and [8 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3101/diff?src=pr&el=tree-more) | |

------

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

[GitHub] [incubator-dubbo] khanimteyaz commented on issue #3101: replace hard coded values with constants and small refactor

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@zonghaishang thanks a lot. Appreciate your time and merging it to master.

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