Skip to content

Commit

Permalink
Allow for null to be passed to doSafeRestart (jenkinsci#9882)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6c5cdfa)
  • Loading branch information
basil committed Oct 23, 2024
1 parent ec28f0e commit 4d21671
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -4659,7 +4659,7 @@ public void generateNotFoundResponse(StaplerRequest2 req, StaplerResponse2 rsp)
*/
@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);
}

/**
Expand Down Expand Up @@ -4692,7 +4692,7 @@ public HttpResponse doSafeRestart(StaplerRequest2 req, @QueryParameter("message"
@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);
}
Expand Down

0 comments on commit 4d21671

Please sign in to comment.