Source:
<code>public Repository build(Environment env) { List<TerminologyRepositoryConfigurer> repositoryConfigurers = ClassPathScanner.INSTANCE.getComponentsByInterface(TerminologyRepositoryConfigurer.class) .stream() .filter(configurer -> repositoryId.equals(configurer.getRepositoryId())) .collect(Collectors.toList()); repositoryConfigurers .forEach(configurer -> { configurer.getAdditionalMappings().forEach(mappings::putMapping); }); if (deletionPolicy instanceof CompositeComponentDeletionPolicy) { CompositeComponentDeletionPolicy compositePolicy = (CompositeComponentDeletionPolicy) deletionPolicy; repositoryConfigurers.forEach(configurer -> { configurer.getComponentDeletionPolicies().forEach( (clazz, predicate) -> { <START> if (!compositePolicy.getDeletionPolicies().containsKey(clazz)) { <END> compositePolicy.getDeletionPolicies().put(clazz, predicate); } }); }); } final TerminologyRepository repository = new TerminologyRepository(repositoryId, mergeMaxResults, env, mappings, log); repository.bind(VersioningRequestBuilder.class, versioningRequestBuilder); repository.bind(ComponentDeletionPolicy.class, deletionPolicy); repository.bind(ComponentRevisionConflictProcessor.class, componentRevisionConflictProcessor); repository.bind(TerminologyComponents.class, terminologyComponents); repository.activate(); repository.service(RevisionIndex.class).hooks().addHook(hook); manager.put(repositoryId, repository); repository.waitForHealth(Health.GREEN, 3 * 60L ); new RepositoryRequest<>(repositoryId, initializer).execute(env); return repository; }</code><technical_language>compositePolicy.getDeletionPolicies().putIfAbsent(clazz, predicate); a bit unexpected (for me) a builder CompositeComponentDeletionPolicy, suggesting result is immutable, proceed pull a writable Map out get method inject extra entries. A factory method added builder starts existing CompositeComponentDeletionPolicy</technical_language>

Target:
public Repository build(Environment env) { List<TerminologyRepositoryConfigurer> repositoryConfigurers = ClassPathScanner.INSTANCE.getComponentsByInterface(TerminologyRepositoryConfigurer.class) .stream() .filter(configurer -> repositoryId.equals(configurer.getRepositoryId())) .collect(Collectors.toList()); repositoryConfigurers .forEach(configurer -> { configurer.getAdditionalMappings().forEach(mappings::putMapping); }); if (deletionPolicy instanceof CompositeComponentDeletionPolicy) { repositoryConfigurers.forEach(configurer -> ((CompositeComponentDeletionPolicy) deletionPolicy).mergeWith(configurer.getComponentDeletionPolicy())); } final TerminologyRepository repository = new TerminologyRepository(repositoryId, mergeMaxResults, env, mappings, log); repository.bind(VersioningRequestBuilder.class, versioningRequestBuilder); repository.bind(ComponentDeletionPolicy.class, deletionPolicy); repository.bind(ComponentRevisionConflictProcessor.class, componentRevisionConflictProcessor); repository.bind(TerminologyComponents.class, terminologyComponents); repository.activate(); repository.service(RevisionIndex.class).hooks().addHook(hook); manager.put(repositoryId, repository); repository.waitForHealth(Health.GREEN, 3 * 60L ); new RepositoryRequest<>(repositoryId, initializer).execute(env); return repository; }