From b919921dbb48d65148be547a57d969282f61a56f Mon Sep 17 00:00:00 2001 From: Taeik Lim Date: Thu, 9 Dec 2021 11:53:48 +0100 Subject: [PATCH] Add @Nullable to StepExecution::getEndTime Issue #4034 --- .../org/springframework/batch/core/StepExecution.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java index a51e2273f..2aaf7aa22 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.springframework.batch.item.ExecutionContext; +import org.springframework.lang.Nullable; import org.springframework.util.Assert; /** @@ -33,6 +34,7 @@ import org.springframework.util.Assert; * * @author Lucas Ward * @author Dave Syer + * @author Taeik Lim * */ @SuppressWarnings("serial") @@ -154,10 +156,11 @@ public class StepExecution extends Entity { } /** - * Returns the time that this execution ended + * Returns the time that this execution ended or {@code null} if the step is running. * - * @return the time that this execution ended + * @return the time that this execution ended or {@code null} if the step is running */ + @Nullable public Date getEndTime() { return endTime; }