Skip to content

Commit

Permalink
Allow for null to be passed to doSafeRestart
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Oct 17, 2024
1 parent a4f6f61 commit 892e1b8
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 @@ -4667,7 +4667,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 @@ -4700,7 +4700,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 892e1b8

Please sign in to comment.