From 3c565ea928236af385ea77f49f87c219b8bd27ec Mon Sep 17 00:00:00 2001 From: Belal Ansari Date: Tue, 8 Apr 2025 19:55:20 +0530 Subject: [PATCH] fix/MNT-24891-BackPort - Skip actionContext to classify as an adhoc property in add-features action logic --- .../action/executer/AddFeaturesActionExecuter.java | 10 ++++------ .../executer/AddFeaturesActionExecuterTest.java | 11 ++++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/repository/src/main/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuter.java b/repository/src/main/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuter.java index 4eed3e6d5d..fd1781227e 100644 --- a/repository/src/main/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuter.java +++ b/repository/src/main/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuter.java @@ -67,7 +67,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase * Set the node service * * @param nodeService - * the node service + * the node service */ public void setNodeService(NodeService nodeService) { @@ -78,7 +78,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase * Set the transaction service * * @param transactionService - * the transaction service + * the transaction service */ public void setTransactionService(TransactionService transactionService) { @@ -102,8 +102,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase if (this.nodeService.exists(actionedUponNodeRef)) { transactionService.getRetryingTransactionHelper().doInTransaction( - new RetryingTransactionCallback() - { + new RetryingTransactionCallback() { public Void execute() throws Throwable { Map properties = new HashMap(); @@ -137,8 +136,7 @@ public class AddFeaturesActionExecuter extends ActionExecuterAbstractBase nodeService.addAspect(actionedUponNodeRef, aspectQName, properties); return null; } - } - ); + }); } } diff --git a/repository/src/test/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuterTest.java b/repository/src/test/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuterTest.java index 1b63c1952c..271eaf06a7 100644 --- a/repository/src/test/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuterTest.java +++ b/repository/src/test/java/org/alfresco/repo/action/executer/AddFeaturesActionExecuterTest.java @@ -28,6 +28,11 @@ package org.alfresco.repo.action.executer; import java.util.List; import java.util.Locale; +import org.junit.Before; +import org.junit.Test; +import org.springframework.extensions.surf.util.I18NUtil; +import org.springframework.transaction.annotation.Transactional; + import org.alfresco.model.ContentModel; import org.alfresco.repo.action.ActionImpl; import org.alfresco.repo.action.access.ActionAccessRestriction; @@ -40,10 +45,6 @@ import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.namespace.QName; import org.alfresco.util.BaseSpringTest; import org.alfresco.util.GUID; -import org.junit.Before; -import org.junit.Test; -import org.springframework.extensions.surf.util.I18NUtil; -import org.springframework.transaction.annotation.Transactional; /** * Add features action execution test @@ -102,7 +103,7 @@ public class AddFeaturesActionExecuterTest extends BaseSpringTest QName.createQName("{test}testnode"), ContentModel.TYPE_CONTENT).getChildRef(); - // Get the executer instance + // Get the executer instance this.executer = (AddFeaturesActionExecuter) this.applicationContext.getBean(AddFeaturesActionExecuter.NAME); }