vidakovic commented on code in PR #6424:
URL: https://github.com/apache/fineract/pull/6424#discussion_r4023383718


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/SpecifiedCacheSupportingCacheManager.java:
##########
@@ -49,7 +48,11 @@ public void afterPropertiesSet() throws Exception {
 
     @Override
     public Cache getCache(String name) {
-        if (supportedCacheNames.contains(name)) {
+        boolean contains;
+        synchronized (supportedCacheNames) {

Review Comment:
   Is it really necessary to have a `synchronized` block here? Are the cache 
names actually changing after boot? If we really have a concurrency issue here 
then why not ReentrantLock?



-- 
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]

Reply via email to