Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make protocols a mutable list (a concrete ArrayList) #3869

Merged
merged 2 commits into from
Apr 17, 2019

Conversation

Moriadry-zz
Copy link

@Moriadry-zz Moriadry-zz commented Apr 14, 2019

What is the purpose of the change

fix bug

issue: #3841

Brief changelog

make protocols a mutable list (a concrete ArrayList)

Verifying this change

XXXXX

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

  • Make sure there is a GITHUB_issue 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.
  • 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.

@codecov-io
Copy link

codecov-io commented Apr 14, 2019

Codecov Report

Merging #3869 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3869      +/-   ##
============================================
- Coverage     63.73%   63.67%   -0.06%     
  Complexity       71       71              
============================================
  Files           712      712              
  Lines         31443    31443              
  Branches       5072     5072              
============================================
- Hits          20039    20022      -17     
- Misses         9109     9124      +15     
- Partials       2295     2297       +2
Impacted Files Coverage Δ Complexity Δ
...org/apache/dubbo/config/AbstractServiceConfig.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...in/java/org/apache/dubbo/config/ServiceConfig.java 56.58% <100%> (ø) 0 <0> (ø) ⬇️
...n/java/org/apache/dubbo/config/ProviderConfig.java 97.84% <100%> (ø) 0 <0> (ø) ⬇️
.../apache/dubbo/qos/protocol/QosProtocolWrapper.java 64.1% <0%> (-17.95%) 0% <0%> (ø)
.../apache/dubbo/remoting/transport/AbstractPeer.java 60.86% <0%> (-6.53%) 0% <0%> (ø)
...e/dubbo/remoting/transport/netty/NettyChannel.java 57.64% <0%> (-4.71%) 0% <0%> (ø)
...he/dubbo/registry/multicast/MulticastRegistry.java 67.87% <0%> (-1.36%) 0% <0%> (ø)
...pache/dubbo/registry/support/AbstractRegistry.java 80.31% <0%> (-0.4%) 0% <0%> (ø)
...pache/dubbo/remoting/transport/AbstractServer.java 47.91% <0%> (+1.04%) 0% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 201795b...8155858. Read the comment docs.

Copy link
Contributor

@chenlushun chenlushun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are Arrays.asList and Collections.singletonList different? Neither class supports the add () method.

@Moriadry-zz Moriadry-zz changed the title use Collections.singletonList instead of Arrays.asList in AbstractServiceConfig.class make protocols a mutable list (a concrete ArrayList) Apr 14, 2019
Copy link
Contributor

@kun-song kun-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nitpicks on your PR.

@Moriadry-zz
Copy link
Author

@satansk could you help me check this?

@kun-song
Copy link
Contributor

@moriadry one more thing, the type parameters need to be removed, otherwise LGTM

@Moriadry-zz
Copy link
Author

@satansk yes, I thought we should support jdk 6 and below, I changed as you request. :)

@Moriadry-zz
Copy link
Author

fix whitespace when git push

@Moriadry-zz Moriadry-zz reopened this Apr 16, 2019
Copy link
Contributor

@ralf0131 ralf0131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the pull request!

@ralf0131
Copy link
Contributor

@satansk What is you opinion on this pull request?

@kun-song
Copy link
Contributor

@ralf0131 LGTM, and thank you @moriadry

@Moriadry-zz
Copy link
Author

my pleasure! and thank you for your help:)

@kun-song kun-song merged commit 43f2a2a into apache:master Apr 17, 2019
vio-lin pushed a commit to vio-lin/incubator-dubbo that referenced this pull request Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants