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 ConfigChangeEvent immutable #3399

Closed

Conversation

wanghbxxxx
Copy link
Contributor

What is the purpose of the change

XXXXX

Brief changelog

XXXXX

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.

@carryxyh
Copy link
Member

I don't think this is necessary. Make the field of ConfigChangeEvent final has the same effect as this pr.

@carryxyh
Copy link
Member

Let's focus on your another pr:
#3398

@carryxyh carryxyh closed this Jan 30, 2019
@wanghbxxxx
Copy link
Contributor Author

I don't think this is necessary. Make the field of ConfigChangeEvent final has the same effect as this pr.

make the filed final wont stop invoker change the properties of event,
for instance: event.setKey("")

@codecov-io
Copy link

Codecov Report

Merging #3399 into master will increase coverage by 0.09%.
The diff coverage is 36.36%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3399      +/-   ##
============================================
+ Coverage     63.75%   63.85%   +0.09%     
  Complexity       71       71              
============================================
  Files           661      661              
  Lines         28602    28600       -2     
  Branches       4806     4821      +15     
============================================
+ Hits          18236    18262      +26     
+ Misses         8134     8118      -16     
+ Partials       2232     2220      -12
Impacted Files Coverage Δ Complexity Δ
...stry/integration/AbstractConfiguratorListener.java 30.76% <0%> (ø) 0 <0> (ø) ⬇️
...apache/dubbo/rpc/cluster/router/tag/TagRouter.java 39.5% <0%> (ø) 0 <0> (ø) ⬇️
...ster/router/condition/config/ListenableRouter.java 33.33% <0%> (ø) 0 <0> (ø) ⬇️
...ter/support/apollo/ApolloDynamicConfiguration.java 0% <0%> (ø) 0 <0> (ø) ⬇️
.../configcenter/support/zookeeper/CacheListener.java 68.42% <100%> (ø) 0 <0> (ø) ⬇️
...e/dubbo/configcenter/DefaultConfigChangeEvent.java 43.75% <43.75%> (ø) 0 <0> (?)
...che/dubbo/remoting/transport/mina/MinaChannel.java 43.42% <0%> (-10.53%) 0% <0%> (ø)
...ng/exchange/support/header/HeartbeatTimerTask.java 73.68% <0%> (-5.27%) 0% <0%> (ø)
...che/dubbo/common/compiler/support/JdkCompiler.java 64.54% <0%> (ø) 0% <0%> (ø) ⬇️
... and 18 more

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 dd2e16b...bab6b04. Read the comment docs.

@carryxyh
Copy link
Member

My fault.
I mean make the field final and then delete the setter methods.

@wanghbxxxx
Copy link
Contributor Author

i

My fault.
I mean make the field final and then delete the setter methods.

ok, i will send another pr later, thank you

@wanghbxxxx wanghbxxxx deleted the branch_immutableConfigChangeEvent branch January 30, 2019 10:11
@wanghbxxxx wanghbxxxx restored the branch_immutableConfigChangeEvent branch January 30, 2019 10:11
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.

3 participants