Skip to content

Commit 18a80fb

Browse files
authored
Migrate to Jakarta EE 9 (#45)
1 parent e74f2ff commit 18a80fb

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.jenkins-ci.plugins</groupId>
66
<artifactId>plugin</artifactId>
7-
<version>4.88</version>
7+
<version>5.2</version>
88
<relativePath />
99
</parent>
1010

@@ -53,8 +53,8 @@
5353
<revision>1.29</revision>
5454
<changelist>-SNAPSHOT</changelist>
5555
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
56-
<jenkins.baseline>2.440</jenkins.baseline>
57-
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
56+
<jenkins.baseline>2.479</jenkins.baseline>
57+
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
5858
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
5959
<!-- TODO fix existing violations -->
6060
<spotbugs.threshold>High</spotbugs.threshold>
@@ -65,7 +65,7 @@
6565
<dependency>
6666
<groupId>io.jenkins.tools.bom</groupId>
6767
<artifactId>bom-${jenkins.baseline}.x</artifactId>
68-
<version>3435.v238d66a_043fb_</version>
68+
<version>3654.v237e4a_f2d8da_</version>
6969
<type>pom</type>
7070
<scope>import</scope>
7171
</dependency>

src/main/java/hudson/plugins/sectioned_view/ListViewSection.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
import net.sf.json.JSONObject;
5252

5353
import org.kohsuke.stapler.DataBoundConstructor;
54-
import org.kohsuke.stapler.StaplerRequest;
54+
import org.kohsuke.stapler.StaplerRequest2;
5555

5656
public class ListViewSection extends SectionedViewSection {
5757

@@ -75,7 +75,7 @@ public static List<ListViewColumn> getDefaultColumns() {
7575
Descriptor<ListViewColumn> des = all.find(d);
7676
if (des != null) {
7777
try {
78-
r.add(des.newInstance(null, null));
78+
r.add(des.newInstance((StaplerRequest2) null, null));
7979
} catch (FormException e) {
8080
LOGGER.log(Level.WARNING, "Failed to instantiate "+des.clazz,e);
8181
}
@@ -89,7 +89,7 @@ public static List<ListViewColumn> getDefaultColumns() {
8989
public static final class DescriptorImpl extends SectionedViewSectionDescriptor {
9090

9191
@Override
92-
public SectionedViewSection newInstance(StaplerRequest req, JSONObject formData) throws FormException {
92+
public SectionedViewSection newInstance(StaplerRequest2 req, JSONObject formData) throws FormException {
9393
ListViewSection section = (ListViewSection) super.newInstance(req, formData);
9494

9595
if (section.columns == null) {

src/main/java/hudson/plugins/sectioned_view/SectionedView.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
import java.util.SortedSet;
4848
import java.util.TreeSet;
4949

50-
import javax.servlet.ServletException;
50+
import jakarta.servlet.ServletException;
5151

5252
import org.kohsuke.stapler.DataBoundConstructor;
53-
import org.kohsuke.stapler.StaplerRequest;
54-
import org.kohsuke.stapler.StaplerResponse;
53+
import org.kohsuke.stapler.StaplerRequest2;
54+
import org.kohsuke.stapler.StaplerResponse2;
5555

5656
public class SectionedView extends View {
5757

@@ -147,7 +147,7 @@ public static Result getResult(Job job) {
147147
* Load view-specific properties here.
148148
*/
149149
@Override
150-
protected void submit(StaplerRequest req) throws ServletException, FormException {
150+
protected void submit(StaplerRequest2 req) throws ServletException, FormException {
151151
initSections();
152152
try {
153153
sections.rebuildHetero(req, req.getSubmittedForm(), Hudson
@@ -178,7 +178,7 @@ public boolean contains(TopLevelItem item) {
178178
}
179179

180180
@Override
181-
public Item doCreateItem(StaplerRequest req, StaplerResponse rsp)
181+
public Item doCreateItem(StaplerRequest2 req, StaplerResponse2 rsp)
182182
throws IOException, ServletException {
183183
return Hudson.getInstance().doCreateItem(req, rsp);
184184
}

src/main/java/hudson/plugins/sectioned_view/SectionedViewSectionDescriptor.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
import java.util.regex.Pattern;
2828
import java.util.regex.PatternSyntaxException;
2929

30-
import javax.servlet.ServletException;
30+
import jakarta.servlet.ServletException;
3131

3232
import hudson.model.Items;
3333
import hudson.model.TopLevelItem;
3434
import net.sf.json.JSONObject;
3535

3636
import org.kohsuke.stapler.QueryParameter;
37-
import org.kohsuke.stapler.StaplerRequest;
37+
import org.kohsuke.stapler.StaplerRequest2;
3838

3939
import hudson.Util;
4040
import hudson.model.Descriptor;
@@ -60,7 +60,7 @@ public boolean hasJobFilterExtensions() {
6060
}
6161

6262
@Override
63-
public SectionedViewSection newInstance(StaplerRequest req, JSONObject formData) throws FormException {
63+
public SectionedViewSection newInstance(StaplerRequest2 req, JSONObject formData) throws FormException {
6464
SectionedViewSection section = (SectionedViewSection)req.bindJSON(getClass().getDeclaringClass(), formData);
6565

6666
if (formData.get("useincluderegex") != null) {

src/main/java/hudson/plugins/sectioned_view/TextSection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
import org.kohsuke.stapler.DataBoundConstructor;
3131
import org.kohsuke.stapler.Stapler;
32-
import org.kohsuke.stapler.StaplerRequest;
32+
import org.kohsuke.stapler.StaplerRequest2;
3333

3434
public class TextSection extends SectionedViewSection {
3535

@@ -72,7 +72,7 @@ public boolean hasStyle() {
7272
public static final class DescriptorImpl extends SectionedViewSectionDescriptor {
7373

7474
@Override
75-
public SectionedViewSection newInstance(StaplerRequest req, JSONObject formData) throws FormException {
75+
public SectionedViewSection newInstance(StaplerRequest2 req, JSONObject formData) throws FormException {
7676
return (SectionedViewSection)req.bindJSON(getClass().getDeclaringClass(), formData);
7777
}
7878

src/main/java/hudson/plugins/sectioned_view/ViewListingSection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import org.apache.commons.lang.StringUtils;
4040
import org.kohsuke.stapler.DataBoundConstructor;
4141
import org.kohsuke.stapler.QueryParameter;
42-
import org.kohsuke.stapler.StaplerRequest;
42+
import org.kohsuke.stapler.StaplerRequest2;
4343

4444
public class ViewListingSection extends SectionedViewSection {
4545

@@ -111,7 +111,7 @@ public List<Collection<View>> getNestedViewColumns(ViewGroup viewGroup) {
111111
public static final class DescriptorImpl extends SectionedViewSectionDescriptor {
112112

113113
@Override
114-
public SectionedViewSection newInstance(StaplerRequest req, JSONObject formData) throws FormException {
114+
public SectionedViewSection newInstance(StaplerRequest2 req, JSONObject formData) throws FormException {
115115
int columns = formData.getInt("columns");
116116
if (columns <= 0) throw new FormException("Columns must be a number greater than 0", "columns");
117117
return (SectionedViewSection)req.bindJSON(getClass().getDeclaringClass(), formData);

0 commit comments

Comments
 (0)