35
35
import io .fabric8 .kubernetes .client .KubernetesClientException ;
36
36
import io .fabric8 .kubernetes .client .VersionInfo ;
37
37
import io .fabric8 .kubernetes .client .informers .SharedIndexInformer ;
38
+ import jakarta .servlet .ServletException ;
38
39
import java .io .IOException ;
39
40
import java .io .StringReader ;
40
41
import java .net .ConnectException ;
61
62
import java .util .concurrent .TimeUnit ;
62
63
import java .util .logging .Level ;
63
64
import java .util .logging .Logger ;
64
- import javax .servlet .ServletException ;
65
65
import jenkins .authentication .tokens .api .AuthenticationTokens ;
66
66
import jenkins .bouncycastle .api .PEMEncodable ;
67
67
import jenkins .metrics .api .Metrics ;
87
87
import org .kohsuke .stapler .HttpResponse ;
88
88
import org .kohsuke .stapler .QueryParameter ;
89
89
import org .kohsuke .stapler .Stapler ;
90
- import org .kohsuke .stapler .StaplerRequest ;
91
- import org .kohsuke .stapler .StaplerResponse ;
90
+ import org .kohsuke .stapler .StaplerRequest2 ;
91
+ import org .kohsuke .stapler .StaplerResponse2 ;
92
92
import org .kohsuke .stapler .interceptor .RequirePOST ;
93
93
import org .kohsuke .stapler .verb .POST ;
94
94
@@ -924,7 +924,7 @@ public PodTemplate.DescriptorImpl getTemplateDescriptor() {
924
924
* Creating a new template.
925
925
*/
926
926
@ POST
927
- public HttpResponse doCreate (StaplerRequest req , StaplerResponse rsp )
927
+ public HttpResponse doCreate (StaplerRequest2 req , StaplerResponse2 rsp )
928
928
throws IOException , ServletException , Descriptor .FormException {
929
929
Jenkins j = Jenkins .get ();
930
930
j .checkPermission (Jenkins .MANAGE );
@@ -1154,7 +1154,7 @@ private static boolean hasPermission(AccessControlled owner) {
1154
1154
LOGGER .log (
1155
1155
Level .WARNING ,
1156
1156
() -> "Unsupported owner type " + (owner == null ? "null" : owner .getClass ()) + " (url: "
1157
- + Stapler .getCurrentRequest ().getOriginalRequestURI ()
1157
+ + Stapler .getCurrentRequest2 ().getOriginalRequestURI ()
1158
1158
+ "). Please report this issue to the plugin maintainers." );
1159
1159
return false ;
1160
1160
}
@@ -1170,7 +1170,7 @@ private static void checkPermission(AccessControlled owner) {
1170
1170
} else {
1171
1171
throw new IllegalArgumentException (
1172
1172
"Unsupported owner type " + (owner == null ? "null" : owner .getClass ()) + " (url: "
1173
- + Stapler .getCurrentRequest ().getOriginalRequestURI ()
1173
+ + Stapler .getCurrentRequest2 ().getOriginalRequestURI ()
1174
1174
+ "). Please report this issue to the plugin maintainers." );
1175
1175
}
1176
1176
}
@@ -1310,7 +1310,7 @@ private Object readResolve() {
1310
1310
}
1311
1311
1312
1312
@ Override
1313
- public Cloud reconfigure (@ NonNull StaplerRequest req , JSONObject form ) throws Descriptor .FormException {
1313
+ public Cloud reconfigure (@ NonNull StaplerRequest2 req , JSONObject form ) throws Descriptor .FormException {
1314
1314
// cloud configuration doesn't contain templates anymore, so just keep existing ones.
1315
1315
var newInstance = (KubernetesCloud ) super .reconfigure (req , form );
1316
1316
newInstance .setTemplates (this .templates );
0 commit comments