mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
merge with default branch
This commit is contained in:
@@ -81,15 +81,7 @@ public class MapCacheManager
|
||||
@Override
|
||||
public synchronized <K, V> MapCache<K, V> getCache(String name)
|
||||
{
|
||||
MapCache<K, V> cache = cacheMap.get(name);
|
||||
|
||||
if (cache == null)
|
||||
{
|
||||
cache = new MapCache<K, V>();
|
||||
cacheMap.put(name, cache);
|
||||
}
|
||||
|
||||
return cache;
|
||||
return (MapCache<K, V>) cacheMap.computeIfAbsent(name, k -> new MapCache<K, V>());
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user