44import hudson .model .AdministrativeMonitor ;
55import org .kohsuke .accmod .Restricted ;
66import org .kohsuke .accmod .restrictions .NoExternalUse ;
7- import org .kohsuke .stapler .HttpResponse ;
8- import org .kohsuke .stapler .HttpResponses ;
9- import org .kohsuke .stapler .QueryParameter ;
7+ import org .kohsuke .stapler .StaplerRequest ;
8+ import org .kohsuke .stapler .StaplerResponse ;
109import org .kohsuke .stapler .interceptor .RequirePOST ;
1110
11+ import javax .servlet .ServletException ;
12+ import java .io .IOException ;
13+
1214/**
1315 * Displays a message whenever there is an issue during the bundle upload process.
1416 * This message will match any of the error messages in the log file.
@@ -35,11 +37,13 @@ public String getDisplayName() {
3537
3638 @ Restricted (NoExternalUse .class )
3739 @ RequirePOST
38- public HttpResponse doAct (@ QueryParameter ( fixEmpty = true ) String yes ) {
40+ public void doAct (StaplerRequest req , StaplerResponse rsp ) throws ServletException , IOException {
3941 AdvisorGlobalConfiguration config = AdvisorGlobalConfiguration .getInstance ();
40- return yes != null
41- ? HttpResponses .redirectViaContextPath (config .getUrlName ())
42- : HttpResponses .forwardToPreviousPage ();
42+ if (req .hasParameter ("yes" )) {
43+ rsp .sendRedirect (req .getContextPath () + "/manage/" + config .getUrlName ());
44+ } else {
45+ rsp .forwardToPreviousPage (req );
46+ }
4347 }
4448
4549 /**
0 commit comments