REPO-3029/MNT-13055: code cleanup - refactor if statement

Entire method body was in an if statement. This is a small change
to return early with inverted logic condition.
This commit is contained in:
Matt Ward
2017-11-09 13:42:11 +00:00
parent af0460e63a
commit b2205af9c1

View File

@@ -124,8 +124,11 @@ public class ExecuteAllRulesActionExecuter extends ActionExecuterAbstractBase
private void executeImpl(final Action ruleAction, NodeRef actionedUponNodeRef, List<Rule> parentRules) private void executeImpl(final Action ruleAction, NodeRef actionedUponNodeRef, List<Rule> parentRules)
{ {
if (this.nodeService.exists(actionedUponNodeRef) == true) if (!this.nodeService.exists(actionedUponNodeRef))
{ {
return;
}
// Get the parameter value // Get the parameter value
boolean includeInherited = false; boolean includeInherited = false;
Boolean includeInheritedValue = (Boolean)ruleAction.getParameterValue(PARAM_EXECUTE_INHERITED_RULES); Boolean includeInheritedValue = (Boolean)ruleAction.getParameterValue(PARAM_EXECUTE_INHERITED_RULES);
@@ -204,7 +207,6 @@ public class ExecuteAllRulesActionExecuter extends ActionExecuterAbstractBase
} }
} }
} }
}
/** /**
* @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List) * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)