From b88fab188e9b9e67500e37de8222c32a39dcecc8 Mon Sep 17 00:00:00 2001 From: kcichonczyk <88378534+kcichonczyk@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:22:59 +0200 Subject: [PATCH] Revert "Revert "[ATS-988] Fixed Intermittent failure (ConcurrentModificationException) caused by a new call to getData() from configScheduler. (#1103)" (#1148)" (#1158) This reverts commit bf3e7390f554c4f27156978495c5c1c1b4bab331. --- .../repo/rendition2/RenditionDefinitionRegistry2Impl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/repository/src/main/java/org/alfresco/repo/rendition2/RenditionDefinitionRegistry2Impl.java b/repository/src/main/java/org/alfresco/repo/rendition2/RenditionDefinitionRegistry2Impl.java index d955fbaa57..f68fb4a4f1 100644 --- a/repository/src/main/java/org/alfresco/repo/rendition2/RenditionDefinitionRegistry2Impl.java +++ b/repository/src/main/java/org/alfresco/repo/rendition2/RenditionDefinitionRegistry2Impl.java @@ -369,7 +369,7 @@ public class RenditionDefinitionRegistry2Impl implements RenditionDefinitionRegi renditionNamesWithMaxSize = data.renditionsFor.get(sourceMimetype); if (renditionNamesWithMaxSize == null) { - renditionNamesWithMaxSize = getRenditionNamesWithMaxSize(sourceMimetype); + renditionNamesWithMaxSize = getRenditionNamesWithMaxSize(data, sourceMimetype); data.renditionsFor.put(sourceMimetype, renditionNamesWithMaxSize); } } @@ -394,10 +394,9 @@ public class RenditionDefinitionRegistry2Impl implements RenditionDefinitionRegi // Gets a list of rendition names that can be created from the given sourceMimetype. // Includes the maxSize for each. - private Set> getRenditionNamesWithMaxSize(String sourceMimetype) + private Set> getRenditionNamesWithMaxSize(Data data, String sourceMimetype) { Set> renditions = new HashSet(); - Data data = getData(); for (Map.Entry entry : data.renditionDefinitions.entrySet()) { RenditionDefinition2 renditionDefinition2 = entry.getValue();