提交 5e0d0044 编写于 作者: K Kohsuke Kawaguchi

success/failure as boolean return value is so C

上级 97b93420
......@@ -23,6 +23,7 @@
*/
package hudson.scm;
import hudson.AbortException;
import hudson.ExtensionPoint;
import hudson.FilePath;
import hudson.Launcher;
......@@ -408,6 +409,10 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
* @return
* false if the operation fails. The error should be reported to the listener.
* Otherwise return the changes included in this update (if this was an update.)
* <p>
* Using the return value to indicate success/failure should
* be considered deprecated, and implementations are encouraged
* to throw {@link AbortException} to indicate a failure.
*
* @throws InterruptedException
* interruption is usually caused by the user aborting the build.
......
......@@ -23,6 +23,7 @@
*/
package hudson.tasks;
import hudson.AbortException;
import hudson.Launcher;
import hudson.Extension;
import hudson.ExtensionList;
......@@ -71,6 +72,10 @@ public interface BuildStep {
* @return
* true if the build can continue, false if there was an error
* and the build needs to be aborted.
* <p>
* Using the return value to indicate success/failure should
* be considered deprecated, and implementations are encouraged
* to throw {@link AbortException} to indicate a failure.
*/
boolean prebuild( AbstractBuild<?,?> build, BuildListener listener );
......@@ -85,6 +90,10 @@ public interface BuildStep {
* @return
* true if the build can continue, false if there was an error
* and the build needs to be aborted.
* <p>
* Using the return value to indicate success/failure should
* be considered deprecated, and implementations are encouraged
* to throw {@link AbortException} to indicate a failure.
*
* @throws InterruptedException
* If the build is interrupted by the user (in an attempt to abort the build.)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册