提交 a78f1d32 编写于 作者: O Oleg Nenashev

[FIXED JENKINS-24340] - Do not disable jobs if supportsMakeDisabled() returns false

This changes prevents the improper usage of method without the preliminary supportsMakeDisabled() check.
As an example, Subversion plugin behaves in such way (JENKINS-24341)
Signed-off-by: NOleg Nenashev <o.v.nenashev@gmail.com>
上级 a6766763
......@@ -690,9 +690,13 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
/**
* Marks the build as disabled.
* The method will ignore the disable command if {@link #supportsMakeDisabled()}
* returns false. The enable command will be executed in any case.
* @param b true - disable, false - enable
*/
public void makeDisabled(boolean b) throws IOException {
if(disabled==b) return; // noop
if (b && !supportsMakeDisabled()) return; // do nothing if the disabling is unsupported
this.disabled = b;
if(b)
Jenkins.getInstance().getQueue().cancel(this);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册