Skip to content

Commit 4fb69c3

Browse files
authored
Merge pull request #372 from basil/jakarta
Migrate from EE 8 to EE 9
2 parents fb5780d + 6cd40f7 commit 4fb69c3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.jenkins-ci.plugins</groupId>
3030
<artifactId>plugin</artifactId>
31-
<version>4.88</version>
31+
<version>5.5</version>
3232
<relativePath />
3333
</parent>
3434
<groupId>org.jenkins-ci.plugins.workflow</groupId>
@@ -64,8 +64,8 @@
6464
<properties>
6565
<changelist>999999-SNAPSHOT</changelist>
6666
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
67-
<jenkins.baseline>2.452</jenkins.baseline>
68-
<jenkins.version>${jenkins.baseline}.4</jenkins.version>
67+
<jenkins.baseline>2.479</jenkins.baseline>
68+
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
6969
<no-test-jar>false</no-test-jar>
7070
<useBeta>true</useBeta>
7171
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>

src/main/java/org/jenkinsci/plugins/workflow/flow/GlobalDefaultFlowDurabilityLevel.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import jenkins.model.Jenkins;
1313
import net.sf.json.JSONObject;
1414
import org.kohsuke.stapler.QueryParameter;
15-
import org.kohsuke.stapler.StaplerRequest;
15+
import org.kohsuke.stapler.StaplerRequest2;
1616

1717
import edu.umd.cs.findbugs.annotations.CheckForNull;
1818
import edu.umd.cs.findbugs.annotations.NonNull;
@@ -62,7 +62,7 @@ public FormValidation doCheckDurabilityHint(@QueryParameter("durabilityHint") St
6262
}
6363

6464
@Override
65-
public boolean configure(StaplerRequest req, JSONObject json) {
65+
public boolean configure(StaplerRequest2 req, JSONObject json) {
6666
// TODO verify if this is covered by permissions checks or we need an explicit check here.
6767
Object ob = json.opt("durabilityHint");
6868
FlowDurabilityHint hint = null;

src/main/java/org/jenkinsci/plugins/workflow/log/ConsoleAnnotators.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
import org.kohsuke.accmod.Restricted;
5050
import org.kohsuke.accmod.restrictions.Beta;
5151
import org.kohsuke.stapler.Stapler;
52-
import org.kohsuke.stapler.StaplerRequest;
53-
import org.kohsuke.stapler.StaplerResponse;
52+
import org.kohsuke.stapler.StaplerRequest2;
53+
import org.kohsuke.stapler.StaplerResponse2;
5454

5555
/**
5656
* Some utility code extracted from {@link AnnotatedLargeText} which probably belongs in {@link ConsoleAnnotator} or {@link ConsoleAnnotationOutputStream}.
@@ -64,7 +64,7 @@ public class ConsoleAnnotators {
6464
* What to pass to {@link ConsoleAnnotationOutputStream#ConsoleAnnotationOutputStream} when overriding {@link AnnotatedLargeText#writeHtmlTo}.
6565
*/
6666
public static <T> ConsoleAnnotator<T> createAnnotator(T context) throws IOException {
67-
StaplerRequest req = Stapler.getCurrentRequest();
67+
StaplerRequest2 req = Stapler.getCurrentRequest2();
6868
try {
6969
String base64 = req != null ? req.getHeader("X-ConsoleAnnotator") : null;
7070
if (base64 != null) {
@@ -98,7 +98,7 @@ public static void setAnnotator(ConsoleAnnotator<?> annotator) throws IOExceptio
9898
oos.writeLong(System.currentTimeMillis());
9999
oos.writeObject(annotator);
100100
}
101-
StaplerResponse rsp = Stapler.getCurrentResponse();
101+
StaplerResponse2 rsp = Stapler.getCurrentResponse2();
102102
if (rsp != null) {
103103
rsp.setHeader("X-ConsoleAnnotator", new String(Base64.getEncoder().encode(baos.toByteArray()), StandardCharsets.US_ASCII));
104104
}

0 commit comments

Comments
 (0)