From 0405d04ef688f77d53cb69390394e34b833058c0 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Wed, 9 Oct 2024 09:58:50 -0400 Subject: [PATCH] Source compatibility with new cores using Jakarta Servlet --- .../plugins/jacococoveragecolumn/BranchCoverageColumnTest.java | 3 ++- .../hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java b/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java index 64f07a9c..44e30b21 100644 --- a/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java +++ b/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import org.kohsuke.stapler.StaplerRequest; public class BranchCoverageColumnTest { @@ -69,7 +70,7 @@ protected synchronized void saveNextBuildNumber() { @Test public void testDescriptor() throws FormException { assertNotNull(sut.getDescriptor()); - assertNotNull(sut.getDescriptor().newInstance(null, JSONObject.fromObject("{\"key\":\"value\"}"))); + assertNotNull(sut.getDescriptor().newInstance((StaplerRequest) null, JSONObject.fromObject("{\"key\":\"value\"}"))); assertNotNull(sut.getDescriptor().getDisplayName()); } diff --git a/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java b/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java index 52aeb99c..4fb3fb95 100644 --- a/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java +++ b/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java @@ -23,6 +23,7 @@ import java.util.SortedMap; import static org.junit.Assert.*; +import org.kohsuke.stapler.StaplerRequest; public class JaCoCoColumnTest { private JaCoCoColumn jaCoCoColumn; @@ -71,7 +72,7 @@ protected synchronized void saveNextBuildNumber() { public void testDescriptor() throws FormException { assertNotNull(jaCoCoColumn.getDescriptor()); assertNotNull( - jaCoCoColumn.getDescriptor().newInstance(null, JSONObject.fromObject("{\"key\":\"value\"}"))); + jaCoCoColumn.getDescriptor().newInstance((StaplerRequest) null, JSONObject.fromObject("{\"key\":\"value\"}"))); assertNotNull(jaCoCoColumn.getDescriptor().getDisplayName()); }