MavenProject (@NotNull Module module) { return CachedValuesManager.getManager(module.getProject()).getCachedValue(module, () -> { VirtualFile f = findPomFile(module, new MavenModelsProvider() { @Override public Module[] getModules() { throw new UnsupportedOperationException(); } @Override public VirtualFile[] getContentRoots(Module module) { return ModuleRootManager.getInstance(module).getContentRoots(); } }); MavenProject result = f == null ? null : findProject(f); return CachedValueProvider.Result.create(result, PsiModificationTracker.MODIFICATION_COUNT); }); }