提交 fa47981c 编写于 作者: J Jesse Glick

[FIXED JENKINS-18356] Restored deprecated AbstractProject.doBuild{,WithParameters} overloads.

上级 26b1362d
......@@ -58,6 +58,9 @@ Upcoming changes</a>
<li class=bug>
“Build Now” link did not work for multijobs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16974">issue 16974</a>)
<li class='major bug'>
Fixed API incompatibility since 1.489.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-18356">issue 18356</a>)
<li class=bug>
“Projects tied to slave” shows unrelated Maven module jobs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17451">issue 17451</a>)
......
......@@ -1812,6 +1812,12 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
rsp.sendRedirect(".");
}
/** @deprecated use {@link #doBuild(StaplerRequest, StaplerResponse, TimeDuration)} */
@Deprecated
public void doBuild(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
doBuild(req, rsp, TimeDuration.fromString(req.getParameter("delay")));
}
/**
* Computes the build cause, using RemoteCause or UserCause as appropriate.
*/
......@@ -1830,7 +1836,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
/**
* Computes the delay by taking the default value and the override in the request parameter into the account.
*
* @deprecated as of 1.488
* @deprecated as of 1.489
* Inject {@link TimeDuration}.
*/
public int getDelay(StaplerRequest req) throws ServletException {
......@@ -1863,6 +1869,12 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
}
/** @deprecated use {@link #doBuildWithParameters(StaplerRequest, StaplerResponse, TimeDuration)} */
@Deprecated
public void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
doBuildWithParameters(req, rsp, TimeDuration.fromString(req.getParameter("delay")));
}
/**
* Schedules a new SCM polling command.
*/
......
......@@ -47,6 +47,7 @@ import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;
import hudson.Extension;
import javax.annotation.CheckForNull;
import org.kohsuke.stapler.export.Flavor;
import static javax.servlet.http.HttpServletResponse.SC_CREATED;
......@@ -105,6 +106,8 @@ public class ParametersDefinitionProperty extends JobProperty<AbstractProject<?,
return (AbstractProject<?, ?>) owner;
}
/** @deprecated use {@link #_doBuild(StaplerRequest, StaplerResponse, TimeDuration)} */
@Deprecated
public void _doBuild(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
_doBuild(req,rsp,TimeDuration.fromString(req.getParameter("delay")));
}
......@@ -144,11 +147,13 @@ public class ParametersDefinitionProperty extends JobProperty<AbstractProject<?,
rsp.sendRedirect(".");
}
/** @deprecated use {@link #buildWithParameters(StaplerRequest, StaplerResponse, TimeDuration)} */
@Deprecated
public void buildWithParameters(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
buildWithParameters(req,rsp,TimeDuration.fromString(req.getParameter("delay")));
}
public void buildWithParameters(StaplerRequest req, StaplerResponse rsp, TimeDuration delay) throws IOException, ServletException {
public void buildWithParameters(StaplerRequest req, StaplerResponse rsp, @CheckForNull TimeDuration delay) throws IOException, ServletException {
List<ParameterValue> values = new ArrayList<ParameterValue>();
for (ParameterDefinition d: parameterDefinitions) {
ParameterValue value = d.createValue(req);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册