Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

/**
* @author Mahmoud Ben Hassine
* @author Yanming Zhou
* @since 5.2.0
*/
public class MongoStepExecutionDao implements StepExecutionDao {
Expand Down Expand Up @@ -114,7 +115,7 @@ public StepExecution getLastStepExecution(JobInstance jobInstance, String stepNa
Optional<org.springframework.batch.core.repository.persistence.StepExecution> lastStepExecution = stepExecutions
.stream()
.filter(stepExecution -> stepExecution.getName().equals(stepName))
.min(Comparator
.max(Comparator
.comparing(org.springframework.batch.core.repository.persistence.StepExecution::getCreateTime)
.thenComparing(org.springframework.batch.core.repository.persistence.StepExecution::getId));
if (lastStepExecution.isPresent()) {
Expand Down
Loading