Skip to content

Commit 1b3098a

Browse files
committed
refactor: use type-safe constants in ExitStatus.isRunning
Signed-off-by: sjiwon <[email protected]>
1 parent 42b1464 commit 1b3098a

File tree

1 file changed

+2
-1
lines changed
  • spring-batch-core/src/main/java/org/springframework/batch/core

1 file changed

+2
-1
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*
2929
* @author Dave Syer
3030
* @author Mahmoud Ben Hassine
31+
* @author JiWon Seo
3132
*
3233
*/
3334
public class ExitStatus implements Serializable, Comparable<ExitStatus> {
@@ -230,7 +231,7 @@ public ExitStatus replaceExitCode(String code) {
230231
* @return {@code true} if the exit code is {@code EXECUTING} or {@code UNKNOWN}.
231232
*/
232233
public boolean isRunning() {
233-
return "EXECUTING".equals(this.exitCode) || "UNKNOWN".equals(this.exitCode);
234+
return EXECUTING.exitCode.equals(this.exitCode) || UNKNOWN.exitCode.equals(this.exitCode);
234235
}
235236

236237
/**

0 commit comments

Comments
 (0)