vidakovic commented on code in PR #6424:
URL: https://github.com/apache/fineract/pull/6424#discussion_r4023388369
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/SpecifiedCacheSupportingCacheManager.java:
##########
@@ -64,7 +67,7 @@ public Cache getCache(String name) {
@Override
public Collection<String> getCacheNames() {
synchronized (supportedCacheNames) {
- return Collections.unmodifiableSet(supportedCacheNames);
+ return new LinkedHashSet<>(supportedCacheNames);
Review Comment:
What's the goal/advantage of making this a modifiable collection? The
underlying collection is already a `LinkedHashSet`... really not understanding
what you intend to solve here. BTW: as mentioned before, I think the
`synchronized` is unnecessary here. After app startup we don't have to seem any
changes in that collection. If we want to be sure then we should make this
collection with the cache names immediately unmodifiable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]