From f21edfd266ac911a0ca87c3e2fcc1ddc7b1f42d9 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Wed, 15 Feb 2006 17:45:25 +0000 Subject: [PATCH] Build fix. RuleServiceImpl was using big NodeService instead of runtimeNodeService to check types git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2394 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/ownable/impl/OwnableServiceTest.java | 17 ++++++++++++----- .../org/alfresco/repo/rule/RuleServiceImpl.java | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/source/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java b/source/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java index 0f42889056..1d84a9bc70 100644 --- a/source/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java +++ b/source/java/org/alfresco/repo/ownable/impl/OwnableServiceTest.java @@ -52,7 +52,7 @@ public class OwnableServiceTest extends TestCase private NodeRef rootNodeRef; - private UserTransaction userTransaction; + private UserTransaction txn; private PermissionService permissionService; @@ -81,8 +81,8 @@ public class OwnableServiceTest extends TestCase TransactionService transactionService = (TransactionService) ctx.getBean(ServiceRegistry.TRANSACTION_SERVICE.getLocalName()); - userTransaction = transactionService.getUserTransaction(); - userTransaction.begin(); + txn = transactionService.getUserTransaction(); + txn.begin(); StoreRef storeRef = nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis()); rootNodeRef = nodeService.getRootNode(storeRef); @@ -103,8 +103,15 @@ public class OwnableServiceTest extends TestCase @Override protected void tearDown() throws Exception { - authenticationComponent.clearCurrentSecurityContext(); - userTransaction.rollback(); + try + { + authenticationComponent.clearCurrentSecurityContext(); + txn.rollback(); + } + catch (Throwable e) + { + // don't absorb any exceptions going past + } super.tearDown(); } diff --git a/source/java/org/alfresco/repo/rule/RuleServiceImpl.java b/source/java/org/alfresco/repo/rule/RuleServiceImpl.java index 802bc04cda..ec72eb7e08 100644 --- a/source/java/org/alfresco/repo/rule/RuleServiceImpl.java +++ b/source/java/org/alfresco/repo/rule/RuleServiceImpl.java @@ -382,7 +382,7 @@ public class RuleServiceImpl implements RuleService, RuntimeRuleService { boolean result = true; - QName nodeType = this.nodeService.getType(nodeRef); + QName nodeType = this.runtimeNodeService.getType(nodeRef); if (this.dictionaryService.isSubClass(nodeType, ContentModel.TYPE_SYSTEM_FOLDER) == true || this.dictionaryService.isSubClass(nodeType, ActionModel.TYPE_ACTION) == true || this.dictionaryService.isSubClass(nodeType, ActionModel.TYPE_ACTION_CONDITION) == true ||