From c5e00ca98ad88cd9a2de61dac11d5bcea4712c65 Mon Sep 17 00:00:00 2001 From: Richard Otte Date: Mon, 6 Jan 2020 15:30:06 -0500 Subject: [PATCH] fix: StepWorkflow::just was creating two separate objects to start and end, rather than one for both. --- .../synopsys/integration/stepworkflow/StepWorkflow.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/synopsys/integration/stepworkflow/StepWorkflow.java b/src/main/java/com/synopsys/integration/stepworkflow/StepWorkflow.java index 92f1527..4606a89 100644 --- a/src/main/java/com/synopsys/integration/stepworkflow/StepWorkflow.java +++ b/src/main/java/com/synopsys/integration/stepworkflow/StepWorkflow.java @@ -33,12 +33,17 @@ protected StepWorkflow(final FlowController start, final FlowControll this.end = end; } + protected StepWorkflow(final FlowController startAndEnd) { + this.start = startAndEnd; + this.end = startAndEnd; + } + public static Builder first(final SubStep firstStep) { return new Builder<>(firstStep); } public static StepWorkflow just(final SubStep onlyStep) { - return new StepWorkflow<>(new FlowController<>(onlyStep), new FlowController<>(onlyStep)); + return new StepWorkflow<>(new FlowController<>(onlyStep)); } public StepWorkflowResponse run() {