You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question regarding the behavior of the isNonDefaultExitStatus method in the ExitStatus class. According to the current implementation, the method returns true when the provided status is null. Here is the relevant code:
/** * @param status The {@code ExitStatus} object containing the exit code to be evaluated. * @return {@code true} if the value matches a known exit code. */publicstaticbooleanisNonDefaultExitStatus(ExitStatusstatus) {
returnstatus == null || status.getExitCode() == null
|| status.getExitCode().equals(ExitStatus.COMPLETED.getExitCode())
|| status.getExitCode().equals(ExitStatus.EXECUTING.getExitCode())
|| status.getExitCode().equals(ExitStatus.FAILED.getExitCode())
|| status.getExitCode().equals(ExitStatus.NOOP.getExitCode())
|| status.getExitCode().equals(ExitStatus.STOPPED.getExitCode())
|| status.getExitCode().equals(ExitStatus.UNKNOWN.getExitCode());
}
Based on the method's purpose, which is to determine if the given ExitStatus matches a known exit code, I am wondering if returning true when status is null is the intended behavior. Intuitively, it seems that null should not be considered as a known exit code, and thus, the method might be expected to return false in such cases.
Can you tell me if the intended behavior is for the method to return true when the input is null? If null is also a known exit code, I wonder if we could add something to the documentation about it.
The text was updated successfully, but these errors were encountered:
I have a question regarding the behavior of the isNonDefaultExitStatus method in the ExitStatus class. According to the current implementation, the method returns true when the provided status is null. Here is the relevant code:
Based on the method's purpose, which is to determine if the given ExitStatus matches a known exit code, I am wondering if returning true when status is null is the intended behavior. Intuitively, it seems that null should not be considered as a known exit code, and thus, the method might be expected to return false in such cases.
I referred to the Spring Batch API documentation
Can you tell me if the intended behavior is for the method to return true when the input is null? If null is also a known exit code, I wonder if we could add something to the documentation about it.
The text was updated successfully, but these errors were encountered: