void (MavenProject aggregator, MavenProject module) { withWriteLock(() -> { List<MavenProject> modules = myAggregatorToModuleMapping.get(aggregator); if (modules == null) return; modules.remove(module); if (modules.isEmpty()) { myAggregatorToModuleMapping.remove(aggregator); } myModuleToAggregatorMapping.remove(module); }); }