Skip to content

Commit b152b0a

Browse files
authored
Merge pull request #167 from jenkinsci/plugin-modernizer/upgradetorecommendcoreversion
Baseline to 2.504
2 parents 5051421 + 333b4dd commit b152b0a

4 files changed

Lines changed: 13 additions & 16 deletions

File tree

pom.xml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.jenkins-ci.plugins</groupId>
77
<artifactId>plugin</artifactId>
8-
<version>5.26</version>
8+
<version>5.28</version>
99
<relativePath />
1010
</parent>
1111

@@ -26,7 +26,7 @@
2626
<changelist>999999-SNAPSHOT</changelist>
2727
<gitHubRepo>jenkinsci/nunit-plugin</gitHubRepo>
2828
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
29-
<jenkins.baseline>2.492</jenkins.baseline>
29+
<jenkins.baseline>2.504</jenkins.baseline>
3030
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
3131
<spotless.check.skip>false</spotless.check.skip>
3232
<ban-junit4-imports.skip>false</ban-junit4-imports.skip>
@@ -36,13 +36,17 @@
3636
<dependency>
3737
<groupId>io.jenkins.tools.bom</groupId>
3838
<artifactId>bom-${jenkins.baseline}.x</artifactId>
39-
<version>5473.vb_9533d9e5d88</version>
39+
<version>5622.vc9c3051619f5</version>
4040
<type>pom</type>
4141
<scope>import</scope>
4242
</dependency>
4343
</dependencies>
4444
</dependencyManagement>
4545
<dependencies>
46+
<dependency>
47+
<groupId>io.jenkins.plugins</groupId>
48+
<artifactId>commons-lang3-api</artifactId>
49+
</dependency>
4650
<dependency>
4751
<groupId>org.jenkins-ci.plugins</groupId>
4852
<artifactId>junit</artifactId>
@@ -51,11 +55,6 @@
5155
<groupId>org.jenkins-ci.plugins</groupId>
5256
<artifactId>structs</artifactId>
5357
</dependency>
54-
<dependency>
55-
<groupId>io.jenkins.plugins</groupId>
56-
<artifactId>commons-lang3-api</artifactId>
57-
<scope>test</scope>
58-
</dependency>
5958
<dependency>
6059
<groupId>io.jenkins.plugins</groupId>
6160
<artifactId>commons-text-api</artifactId>

src/main/java/hudson/plugins/nunit/NUnitPublisher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package hudson.plugins.nunit;
22

3+
import edu.umd.cs.findbugs.annotations.NonNull;
34
import hudson.AbortException;
45
import hudson.EnvVars;
56
import hudson.Extension;
@@ -23,10 +24,9 @@
2324
import java.io.IOException;
2425
import java.io.Serializable;
2526
import java.util.UUID;
26-
import javax.annotation.Nonnull;
2727
import jenkins.security.MasterToSlaveCallable;
2828
import jenkins.tasks.SimpleBuildStep;
29-
import org.apache.commons.lang.BooleanUtils;
29+
import org.apache.commons.lang3.BooleanUtils;
3030
import org.apache.tools.ant.DirectoryScanner;
3131
import org.apache.tools.ant.types.FileSet;
3232
import org.jenkinsci.Symbol;
@@ -271,7 +271,7 @@ public TestResult call() throws IOException {
271271

272272
@Override
273273
public void perform(
274-
@Nonnull Run<?, ?> run, @Nonnull FilePath ws, @Nonnull Launcher launcher, @Nonnull TaskListener listener)
274+
@NonNull Run<?, ?> run, @NonNull FilePath ws, @NonNull Launcher launcher, @NonNull TaskListener listener)
275275
throws InterruptedException, IOException {
276276
if (debug) {
277277
listener.getLogger().println("NUnit publisher running in debug mode.");

src/main/java/hudson/plugins/nunit/NUnitReportTransformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import javax.xml.transform.dom.DOMSource;
2424
import javax.xml.transform.stream.StreamResult;
2525
import javax.xml.transform.stream.StreamSource;
26-
import org.apache.commons.lang.StringUtils;
26+
import org.apache.commons.lang3.StringUtils;
2727
import org.w3c.dom.Document;
2828
import org.w3c.dom.Element;
2929
import org.w3c.dom.NodeList;

src/test/java/hudson/plugins/nunit/NUnitPublisherTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,13 @@ void parallelPublishing(JenkinsRule j) throws Exception {
289289
FilePath thirdTestFile = ws.child("third-result.xml");
290290
thirdTestFile.copyFrom(this.getClass().getResourceAsStream("NUnit-correct3.xml"));
291291

292-
job.setDefinition(new CpsFlowDefinition(
293-
"""
292+
job.setDefinition(new CpsFlowDefinition("""
294293
node {
295294
parallel(a: { step([$class: 'NUnitPublisher', testResultsPattern: 'first-result.xml', debug: false, keepJUnitReports: true, skipJUnitArchiver:false]) },
296295
b: { step([$class: 'NUnitPublisher', testResultsPattern: 'second-result.xml', debug: false, keepJUnitReports: true, skipJUnitArchiver:false]) },
297296
c: { step([$class: 'NUnitPublisher', testResultsPattern: 'third-result.xml', debug: false, keepJUnitReports: true, skipJUnitArchiver:false]) })
298297
}
299-
""",
300-
true));
298+
""", true));
301299
WorkflowRun r = j.waitForCompletion(job.scheduleBuild2(0).waitForStart());
302300
TestResultAction action = r.getAction(TestResultAction.class);
303301
assertNotNull(action);

0 commit comments

Comments
 (0)