Skip to content

Commit

Permalink
fix: StepWorkflow::just was creating two separate objects to start an…
Browse files Browse the repository at this point in the history
…d end, rather than one for both.
  • Loading branch information
rottebds committed Jan 6, 2020
1 parent ab9956f commit c5e00ca
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ protected StepWorkflow(final FlowController<Object, ?> start, final FlowControll
this.end = end;
}

protected StepWorkflow(final FlowController<Object, T> startAndEnd) {
this.start = startAndEnd;
this.end = startAndEnd;
}

public static <R> Builder<R> first(final SubStep<Object, R> firstStep) {
return new Builder<>(firstStep);
}

public static <R> StepWorkflow<R> just(final SubStep<Object, R> onlyStep) {
return new StepWorkflow<>(new FlowController<>(onlyStep), new FlowController<>(onlyStep));
return new StepWorkflow<>(new FlowController<>(onlyStep));
}

public StepWorkflowResponse<T> run() {
Expand Down

0 comments on commit c5e00ca

Please sign in to comment.