VirtualFilePointerContainer (@NotNull OrderRootType rootType, int flags, @NotNull Supplier<? extends Collection<String>> rootUrlsComputer) { ConcurrentMap<CacheKey, VirtualFilePointerContainer> map = myRoots.get(); CacheKey key = new CacheKey(rootType, flags); VirtualFilePointerContainer cached = map == null ? null : map.get(key); if (cached == null) { map = ConcurrencyUtil.cacheOrGet(myRoots, new ConcurrentHashMap<>()); cached = map.computeIfAbsent(key, __ -> createContainer(rootUrlsComputer.get())); } return cached == EMPTY ? null : cached; }