[Minor] Code cleanup

This commit is contained in:
Robert von Burg 2023-02-24 14:18:00 +01:00
parent 8811b39585
commit 5f80c4a344
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,5 @@
package li.strolch.execution.policy;
import static li.strolch.model.StrolchModelConstants.PolicyConstants.BAG_OBJECTIVES;
import static li.strolch.model.StrolchModelConstants.PolicyConstants.PARAM_DURATION;
import li.strolch.model.activity.Action;
@ -26,7 +25,7 @@ public class DurationExecution extends SimpleExecution {
public void toExecution(Action action) {
if (this.delayToExecuted) {
super.toExecution(action);
if (action.findParameter(BAG_OBJECTIVES, PARAM_DURATION, true).isEmpty())
if (action.findObjectivesParam(PARAM_DURATION, true).isEmpty())
toExecuted(action);
else
delayToExecuted(action);

View File

@ -269,7 +269,7 @@ public abstract class ExecutionPolicy extends StrolchPolicy {
* @return the {@link DurationParameter}
*/
protected DurationParameter findActionDuration(Action action) {
return action.findParameter(BAG_OBJECTIVES, PARAM_DURATION, true);
return action.findObjectivesParam(PARAM_DURATION, true);
}
/**