From c87d1c94750ef0a04792e5d0da403b5401a82a35 Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Thu, 16 Jan 2025 22:01:13 +0530 Subject: [PATCH] [fix/MNT-24172-fixRendition2Recreation] Fix for rendition2 recreation --- .../repo/rendition/executer/AbstractRenderingEngine.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/repository/src/main/java/org/alfresco/repo/rendition/executer/AbstractRenderingEngine.java b/repository/src/main/java/org/alfresco/repo/rendition/executer/AbstractRenderingEngine.java index 6ddcfb1206..a968f82fb4 100644 --- a/repository/src/main/java/org/alfresco/repo/rendition/executer/AbstractRenderingEngine.java +++ b/repository/src/main/java/org/alfresco/repo/rendition/executer/AbstractRenderingEngine.java @@ -1000,7 +1000,7 @@ public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase } // Check if the node has the applied renditioned aspect, and if it does, // remove the existing rendition node and assign the newly created rendition node. - if (nodeService.hasAspect(sourceNode, RenditionModel.ASPECT_RENDITIONED) == true) + if (nodeService.hasAspect(sourceNode, RenditionModel.ASPECT_RENDITIONED)) { List renditions = nodeService.getChildAssocs(sourceNode, RenditionModel.ASSOC_RENDITION, renditionQName); if (!renditions.isEmpty()) @@ -1011,7 +1011,9 @@ public abstract class AbstractRenderingEngine extends ActionExecuterAbstractBase } if (logger.isDebugEnabled()) { - logger.debug("Returning the existing rendition node with name " + renditionQName); + logger.debug("Removing the existing rendition node that doesn't have contentData and " + + "assigning the newly created rendition node: " + renditionNode); + } } // Return the link between the source and the new, final rendition