Skip to content
Permalink
Browse files

[FIXED JENKINS-18356] Restored deprecated AbstractProject.doBuild{,Wi…

…thParameters} overloads.
  • Loading branch information
jglick committed Jun 14, 2013
1 parent 26b1362 commit fa47981c071bf8c11041d4f11b2be0c73ab0b270
@@ -58,6 +58,9 @@
<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 void doBuild( StaplerRequest req, StaplerResponse rsp, @QueryParameter Ti
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 void doBuild( StaplerRequest req, StaplerResponse rsp, @QueryParameter Ti
/**
* 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 void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp, @Quer

}

/** @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.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 int size() {
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 void _doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter Ti
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);

0 comments on commit fa47981

Please sign in to comment.
You can’t perform that action at this time.