-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
MutablePropertySources will not find or remove proxied sources #25369
Comments
Another, potentially better way to solve this would be to rewrite the Since |
/cc @smaldini |
I have a branch here that can be reviewed and cherry-picked if suitable. |
Replace the `CopyOnWriteArrayList` in `MutablePropertySources` with a direct array implementation that we can lock during operations. Prior to this commit it was possible that the underlying list would be updated in the middle of certain operations. Closes spring-projectsgh-25369
After some back and forth, in addition to delegating to the |
Includes synchronization for mutators on MutablePropertySources. Closes spring-projectsgh-25369
Includes synchronization for mutators on MutablePropertySources. Closes spring-projectsgh-25369 (cherry picked from commit 01bab89)
MutablePropertySources
hasget
andremove
methods that look like this:These attempt to find the index of a property source index by checking for the name. The
PropertySource.named
method returns aComparisonPropertySource
which depends on the inheritedPropertySource
equals
andhashCode
implementations.The equals method looks like this:
If you are using a library such as jasypt, it's possible that your property source will be a proxy instance and won't actually contain a populated
name
field. The equals method could use((PropertySource<?>) other).getName()))
which would solve this issue.The text was updated successfully, but these errors were encountered: