Skip to content

Commit

Permalink
Allow for null to be passed to doSafeRestart (#9882)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Oct 21, 2024
1 parent 5f7026d commit 6c5cdfa
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 @@ -4668,7 +4668,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 @@ -4701,7 +4701,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 6c5cdfa

Please sign in to comment.