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

Remove unused private field 'environment' of AutoUpdateConfigChangeListener. #3755

Closed
wants to merge 1 commit into from

Conversation

mghio
Copy link
Contributor

@mghio mghio commented Jun 12, 2021

What's the purpose of this PR

Remove unused private field 'environment' of AutoUpdateConfigChangeListener.

@github-actions
Copy link

github-actions bot commented Jun 12, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@mghio
Copy link
Contributor Author

mghio commented Jun 12, 2021

I have read the CLA Document and I hereby sign the CLA

@codecov-commenter
Copy link

Codecov Report

Merging #3755 (e50e6f0) into master (a9d8383) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3755      +/-   ##
============================================
- Coverage     50.49%   50.41%   -0.08%     
+ Complexity     2396     2391       -5     
============================================
  Files           458      458              
  Lines         14472    14471       -1     
  Branches       1467     1467              
============================================
- Hits           7308     7296      -12     
- Misses         6659     6668       +9     
- Partials        505      507       +2     
Impacted Files Coverage Δ
...apollo/spring/config/PropertySourcesProcessor.java 92.45% <ø> (ø)
...pring/property/AutoUpdateConfigChangeListener.java 91.83% <100.00%> (-0.17%) ⬇️
...work/apollo/biz/message/DatabaseMessageSender.java 50.00% <0.00%> (-14.59%) ⬇️
...rk/apollo/spring/property/SpringValueRegistry.java 83.33% <0.00%> (-5.56%) ⬇️
.../framework/apollo/spring/property/SpringValue.java 87.71% <0.00%> (-1.76%) ⬇️
.../apollo/internals/RemoteConfigLongPollService.java 77.71% <0.00%> (-0.61%) ⬇️

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 a9d8383...e50e6f0. Read the comment docs.

private final ConfigurableBeanFactory beanFactory;
private final TypeConverter typeConverter;
private final PlaceholderHelper placeholderHelper;
private final SpringValueRegistry springValueRegistry;
private final Gson gson;

public AutoUpdateConfigChangeListener(Environment environment, ConfigurableListableBeanFactory beanFactory){
Copy link
Member

Choose a reason for hiding this comment

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

This is a public API and it resides in client module, so this is potentially a breaking change, though the users are rarely possible to use it, what do other reviewers' opinion ?

Copy link
Member

Choose a reason for hiding this comment

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

I also agree we should be very very careful when introducing potentially breaking changes.
I checked the commit history and the environment is not used since #2173. But since this is a public class, I think it's better not to change the constructor signature.

Copy link
Contributor

@Anilople Anilople left a comment

Choose a reason for hiding this comment

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

apollo-client has been used widely by user.

compability is important.

If users extends those classes by themself, they will meet additionally trouble when method's signture changed.

Thanks for your time on this PR.

Reference:

@kezhenxu94
Copy link
Member

@mghio let's mark this and do the changes only when we must have breaking changes, for example, in the next major version. Thanks for the interest anyway 🙇 .

@kezhenxu94 kezhenxu94 closed this Jun 12, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants