-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BATCH-2715: Change the method name "getStartable" to "isStartable". #600
Conversation
Hi, I agree with you on the change. However, since the method We need to proceed in two steps: deprecate it in one version and remove it in the next version. For example:
Can you please update the PR with step 1? We will then do the necessary for v4.2. Thanks in advance, |
@benas Hi, how about now? |
@@ -238,6 +238,26 @@ public String getStepName() { | |||
return result; | |||
} | |||
|
|||
protected boolean isStartable(StepExecution stepExecution, ExecutionContext context) throws JobExecutionException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can avoid code duplication by making isStartable
call getStartable
:
protected boolean isStartable(StepExecution stepExecution, ExecutionContext context) throws JobExecutionException {
return getStartable(stepExecution, context);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benas Updated the PR with your comments.
|
||
} | ||
|
||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to document this deprecated method and say which method is intended to replace it (isStartable
in this case).
The method is named as "getStartable". "getStartable" is prone to obtain something. "isStartable" is a query asking whether the stepExecution is startable, which describes what the method is doning. So, "isStartable" should be more intuitive.
@brucekuiliu Thank you for updating the PR! LGTM. Rebased and merged as e29f77e. |
The method is named as "getStartable". "getStartable" is prone to obtain something. "isStartable" is a query asking whether the stepExecution is startable, which describes what the method is doning. So, "isStartable" should be more intuitive.