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

[GitHub] [incubator-dubbo] dongYES opened pull request #3412: Activate SPI sort

## What is the purpose of the change

[dubbo-3309] fix #3309 
When all active implementation classes of a SPI interface are sorted (Activate Comparator), and when the implementation classes of the SPI interface not only implement the SPI interface, but also other non-SPI interfaces, if the SPI interface is not in the first place of the implements, the function of before and after will fail.

## Brief changelog

get the specified SPI interface modifier.

## 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/3412 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] dongYES commented on issue #3412: Activate SPI sort

Posted by "dongYES (GitHub)" <gi...@apache.org>.
> make sure your `${HOME}/.gitconfig` has the following config:
> 
> ```
> [core]
> 	autocrlf = false
> ```

get!!
tk!

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


[GitHub] [incubator-dubbo] lovepoem commented on issue #3412: Activate SPI sort

Posted by "lovepoem (GitHub)" <gi...@apache.org>.
Why there are so many changes  ? 

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


[GitHub] [incubator-dubbo] dongYES commented on issue #3412: Activate SPI sort

Posted by "dongYES (GitHub)" <gi...@apache.org>.
> > > Why there are so many changes ?
> > 
> > 
> > branch Wrong choice
> 
> maybe you need to set config autocrlf
> git config core.autocrlf false

thanks!

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


[GitHub] [incubator-dubbo] dongYES commented on pull request #3412: Activate SPI sort

Posted by "dongYES (GitHub)" <gi...@apache.org>.
thanks!!

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

[GitHub] [incubator-dubbo] dongYES commented on issue #3412: Activate SPI sort

Posted by "dongYES (GitHub)" <gi...@apache.org>.
> Why there are so many changes ?

branch Wrong choice

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


[GitHub] [incubator-dubbo] codecov-io commented on issue #3412: Activate SPI sort

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3412?src=pr&el=h1) Report
> Merging [#3412](https://codecov.io/gh/apache/incubator-dubbo/pull/3412?src=pr&el=desc) into [2.6.x](https://codecov.io/gh/apache/incubator-dubbo/commit/19f30941f2b14c7df1a989b9c115c75c5667cdd9?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `17.5%`.

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

```diff
@@             Coverage Diff              @@
##              2.6.x    #3412      +/-   ##
============================================
+ Coverage     47.28%   47.28%   +<.01%     
  Complexity     4300     4300              
============================================
  Files           554      554              
  Lines         24412    24416       +4     
  Branches       4321     4322       +1     
============================================
+ Hits          11544    11546       +2     
+ Misses        11077    11076       -1     
- Partials       1791     1794       +3
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3412?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...o/common/extension/support/ActivateComparator.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL2V4dGVuc2lvbi9zdXBwb3J0L0FjdGl2YXRlQ29tcGFyYXRvci5qYXZh) | `17.5% <17.5%> (+6.38%)` | `3 <3> (ø)` | :arrow_down: |
| [...ba/dubbo/remoting/transport/netty/NettyClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDbGllbnQuamF2YQ==) | `74.13% <0%> (-8.63%)` | `12% <0%> (-1%)` | |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9jb25maWcvc3ByaW5nL2V4dGVuc2lvbi9TcHJpbmdFeHRlbnNpb25GYWN0b3J5LmphdmE=) | `78.37% <0%> (-5.41%)` | `9% <0%> (ø)` | |
| [...baba/dubbo/remoting/transport/mina/MinaClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9taW5hL01pbmFDbGllbnQuamF2YQ==) | `57.81% <0%> (-1.57%)` | `8% <0%> (-1%)` | |
| [...bo/remoting/transport/netty/NettyCodecAdapter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDb2RlY0FkYXB0ZXIuamF2YQ==) | `53.12% <0%> (-1.57%)` | `3% <0%> (ø)` | |
| [...a/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDaGFubmVsLmphdmE=) | `66.25% <0%> (+5%)` | `21% <0%> (+1%)` | :arrow_up: |
| [.../remoting/transport/netty4/NettyServerHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L25ldHR5NC9OZXR0eVNlcnZlckhhbmRsZXIuamF2YQ==) | `83.33% <0%> (+11.11%)` | `7% <0%> (+1%)` | :arrow_up: |

------

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

[GitHub] [incubator-dubbo] beiwei30 commented on issue #3412: Activate SPI sort

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
ps, pls. consider to make the same change to the **master** branch.

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


[GitHub] [incubator-dubbo] beiwei30 closed pull request #3412: Activate SPI sort

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

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


[GitHub] [incubator-dubbo] wanghbxxxx commented on issue #3412: Activate SPI sort

Posted by "wanghbxxxx (GitHub)" <gi...@apache.org>.
> > Why there are so many changes ?
> 
> branch Wrong choice

maybe you need to set config autocrlf
git config core.autocrlf false

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


[GitHub] [incubator-dubbo] beiwei30 commented on pull request #3412: Activate SPI sort

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
pay attention to the code style: 
```suggestion
        if (o1.getClass().getInterfaces().length > 0) {
```

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


[GitHub] [incubator-dubbo] beiwei30 commented on issue #3412: Activate SPI sort

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
LGTM.

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


[GitHub] [incubator-dubbo] codecov-io commented on issue #3412: Activate SPI sort

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3412?src=pr&el=h1) Report
> Merging [#3412](https://codecov.io/gh/apache/incubator-dubbo/pull/3412?src=pr&el=desc) into [2.6.x](https://codecov.io/gh/apache/incubator-dubbo/commit/19f30941f2b14c7df1a989b9c115c75c5667cdd9?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `17.5%`.

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

```diff
@@             Coverage Diff              @@
##              2.6.x    #3412      +/-   ##
============================================
+ Coverage     47.28%   47.28%   +<.01%     
  Complexity     4300     4300              
============================================
  Files           554      554              
  Lines         24412    24416       +4     
  Branches       4321     4322       +1     
============================================
+ Hits          11544    11546       +2     
+ Misses        11077    11076       -1     
- Partials       1791     1794       +3
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3412?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...o/common/extension/support/ActivateComparator.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vY29tbW9uL2V4dGVuc2lvbi9zdXBwb3J0L0FjdGl2YXRlQ29tcGFyYXRvci5qYXZh) | `17.5% <17.5%> (+6.38%)` | `3 <3> (ø)` | :arrow_down: |
| [...ba/dubbo/remoting/transport/netty/NettyClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDbGllbnQuamF2YQ==) | `74.13% <0%> (-8.63%)` | `12% <0%> (-1%)` | |
| [...onfig/spring/extension/SpringExtensionFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1zcHJpbmcvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9jb25maWcvc3ByaW5nL2V4dGVuc2lvbi9TcHJpbmdFeHRlbnNpb25GYWN0b3J5LmphdmE=) | `78.37% <0%> (-5.41%)` | `9% <0%> (ø)` | |
| [...baba/dubbo/remoting/transport/mina/MinaClient.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbWluYS9zcmMvbWFpbi9qYXZhL2NvbS9hbGliYWJhL2R1YmJvL3JlbW90aW5nL3RyYW5zcG9ydC9taW5hL01pbmFDbGllbnQuamF2YQ==) | `57.81% <0%> (-1.57%)` | `8% <0%> (-1%)` | |
| [...bo/remoting/transport/netty/NettyCodecAdapter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDb2RlY0FkYXB0ZXIuamF2YQ==) | `53.12% <0%> (-1.57%)` | `3% <0%> (ø)` | |
| [...a/dubbo/remoting/transport/netty/NettyChannel.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHkvc3JjL21haW4vamF2YS9jb20vYWxpYmFiYS9kdWJiby9yZW1vdGluZy90cmFuc3BvcnQvbmV0dHkvTmV0dHlDaGFubmVsLmphdmE=) | `66.25% <0%> (+5%)` | `21% <0%> (+1%)` | :arrow_up: |
| [.../remoting/transport/netty4/NettyServerHandler.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3412/diff?src=pr&el=tree#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctbmV0dHk0L3NyYy9tYWluL2phdmEvY29tL2FsaWJhYmEvZHViYm8vcmVtb3RpbmcvdHJhbnNwb3J0L25ldHR5NC9OZXR0eVNlcnZlckhhbmRsZXIuamF2YQ==) | `83.33% <0%> (+11.11%)` | `7% <0%> (+1%)` | :arrow_up: |

------

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

[GitHub] [incubator-dubbo] beiwei30 commented on issue #3412: Activate SPI sort

Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
make sure your `${HOME}/.gitconfig` has the following config:

```
[core]
	autocrlf = false
```

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