MavenProject (@NotNull MavenProject project) { return withReadLock(() -> { MavenProject rootProject = project; while (true) { MavenProject aggregator = myModuleToAggregatorMapping.get(rootProject); if (aggregator == null) { return rootProject; } rootProject = aggregator; } }); }