mirror of https://github.com/jenkinsci/jenkins.git
Allow for null to be passed to `doSafeRestart` (#9882)
This commit is contained in:
parent
5f7026dd03
commit
6c5cdfa96c
|
@ -4668,7 +4668,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
|
|||
*/
|
||||
@Deprecated(since = "2.414")
|
||||
public HttpResponse doSafeRestart(StaplerRequest req) throws IOException, ServletException, RestartNotSupportedException {
|
||||
return doSafeRestart(StaplerRequest.toStaplerRequest2(req), null);
|
||||
return doSafeRestart(req != null ? StaplerRequest.toStaplerRequest2(req) : null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4701,7 +4701,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
|
|||
@StaplerNotDispatchable
|
||||
public HttpResponse doSafeRestart(StaplerRequest req, @QueryParameter("message") String message) throws IOException, javax.servlet.ServletException, RestartNotSupportedException {
|
||||
try {
|
||||
return doSafeRestart(StaplerRequest.toStaplerRequest2(req), message);
|
||||
return doSafeRestart(req != null ? StaplerRequest.toStaplerRequest2(req) : null, message);
|
||||
} catch (ServletException e) {
|
||||
throw ServletExceptionWrapper.fromJakartaServletException(e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue