You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "tswstarplanet (GitHub)" <gi...@apache.org> on 2019/01/20 14:27:54 UTC
[GitHub] [incubator-dubbo] tswstarplanet opened pull request #3282:
[Code Optimize]Optimize code of wrap a service bean
## What is the purpose of the change
1.Move the iteration of methods of a service config to the if block of the class have method declared not by Object
2.remove some useless parameter type
## 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) 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/3282 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] tswstarplanet commented on issue #3282:
[Code Optimize]Optimize code of wrap a service bean
Posted by "tswstarplanet (GitHub)" <gi...@apache.org>.
@khanimteyaz The origin for loop and following if block can be move to the identical if block
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3282 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] tswstarplanet commented on issue #3282:
[Code Optimize]Optimize code of wrap a service bean
Posted by "tswstarplanet (GitHub)" <gi...@apache.org>.
@khanimteyaz I think it can make code clearer.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3282 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] codecov-io commented on issue #3282: [Code
Optimize]Optimize code of wrap a service bean
Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3282?src=pr&el=h1) Report
> Merging [#3282](https://codecov.io/gh/apache/incubator-dubbo/pull/3282?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-dubbo/commit/cb599135f99d20372d1c227814326df8995b37fc?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.
[](https://codecov.io/gh/apache/incubator-dubbo/pull/3282?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #3282 +/- ##
===========================================
- Coverage 63.9% 63.9% -0.01%
Complexity 75 75
===========================================
Files 653 653
Lines 28218 28217 -1
Branches 4778 4777 -1
===========================================
- Hits 18034 18032 -2
- Misses 7991 7996 +5
+ Partials 2193 2189 -4
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3282?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...java/org/apache/dubbo/common/bytecode/Wrapper.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vYnl0ZWNvZGUvV3JhcHBlci5qYXZh) | `82.38% <100%> (-0.1%)` | `0 <0> (ø)` | |
| [...che/dubbo/remoting/transport/mina/MinaChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L21pbmEvTWluYUNoYW5uZWwuamF2YQ==) | `43.42% <0%> (-10.53%)` | `0% <0%> (ø)` | |
| [...org/apache/dubbo/rpc/protocol/AbstractInvoker.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JwYy9wcm90b2NvbC9BYnN0cmFjdEludm9rZXIuamF2YQ==) | `62.9% <0%> (-3.23%)` | `0% <0%> (ø)` | |
| [...a/org/apache/dubbo/monitor/dubbo/DubboMonitor.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tbW9uaXRvci9kdWJiby1tb25pdG9yLWRlZmF1bHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL21vbml0b3IvZHViYm8vRHViYm9Nb25pdG9yLmphdmE=) | `87.85% <0%> (-1.87%)` | `0% <0%> (ø)` | |
| [...dubbo/metadata/support/AbstractMetadataReport.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tbWV0YWRhdGEtcmVwb3J0L2R1YmJvLW1ldGFkYXRhLXJlcG9ydC1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL21ldGFkYXRhL3N1cHBvcnQvQWJzdHJhY3RNZXRhZGF0YVJlcG9ydC5qYXZh) | `69.35% <0%> (-1.62%)` | `0% <0%> (ø)` | |
| [...dubbo/remoting/exchange/support/DefaultFuture.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZW1vdGluZy9leGNoYW5nZS9zdXBwb3J0L0RlZmF1bHRGdXR1cmUuamF2YQ==) | `69.59% <0%> (-1.36%)` | `0% <0%> (ø)` | |
| [...pache/dubbo/registry/support/AbstractRegistry.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9zdXBwb3J0L0Fic3RyYWN0UmVnaXN0cnkuamF2YQ==) | `80.76% <0%> (-0.77%)` | `0% <0%> (ø)` | |
| [...apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL0R1YmJvUHJvdG9jb2wuamF2YQ==) | `66.66% <0%> (+0.83%)` | `0% <0%> (ø)` | :arrow_down: |
| [...dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tcnBjL2R1YmJvLXJwYy1kdWJiby9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL3Byb3RvY29sL2R1YmJvL0NhbGxiYWNrU2VydmljZUNvZGVjLmphdmE=) | `77.94% <0%> (+1.47%)` | `0% <0%> (ø)` | :arrow_down: |
| [...e/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9uZXR0eS9OZXR0eUNoYW5uZWwuamF2YQ==) | `62.35% <0%> (+4.7%)` | `0% <0%> (ø)` | :arrow_down: |
| ... and [3 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3282/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3282?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/3282?src=pr&el=footer). Last update [cb59913...8dd4eea](https://codecov.io/gh/apache/incubator-dubbo/pull/3282?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/3282 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] beiwei30 closed pull request #3282: [Code
Optimize]Optimize code of wrap a service bean
Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
[ pull request closed by beiwei30 ]
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3282 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] beiwei30 commented on issue #3282: [Code
Optimize]Optimize code of wrap a service bean
Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
LGTM.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3282 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] khanimteyaz commented on issue #3282:
[Code Optimize]Optimize code of wrap a service bean
Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@tswstarplanet , I was trying to find out the optimization part in this PR but I think I have failed, could you guide me to find out the optimization part?
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3282 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org