Skip to content

Conversation

sjiwon
Copy link
Contributor

@sjiwon sjiwon commented Mar 15, 2025

Overview

This PR improves the type-safety and readability of the ExitStatus#isRunning method in the Spring Batch core module.

Changes

  • Refactored the existing string-based comparisons in ExitStatus#isRunning by utilizing type-safe comparisons with predefined ExitStatus constants
  • Added unit tests covering the possible scenarios for the isRunning method, ensuring correct behavior for each relevant status:
    • return true: EXECUTING, UNKNOWN
    • return false: COMPLETED, FAILED, STOPPED, NOOP

@sjiwon sjiwon marked this pull request as draft March 15, 2025 07:41
@sjiwon sjiwon force-pushed the refactor/exit-status-type-safe-comparison branch from f023ff8 to 62f5c3a Compare March 15, 2025 07:58
@sjiwon sjiwon marked this pull request as ready for review March 15, 2025 07:58
@fmbenhassine
Copy link
Contributor

LGTM 👍 Rebased, squashed and merged as 30b5120.

Thank you for your contribution!

@fmbenhassine fmbenhassine added pr-for: enhancement in: core for: backport-to-5.2.x Issues that will be back-ported to the 5.2.x line labels Jun 4, 2025
@fmbenhassine fmbenhassine added this to the 6.0.0-M1 milestone Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-5.2.x Issues that will be back-ported to the 5.2.x line in: core pr-for: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants