Skip to content

Commit c5ae627

Browse files
authored
Merge pull request #993 from hazendaz/next-up
Define method parameters and use node instead of def
2 parents 25d3668 + 8c75598 commit c5ae627

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/groovy/org/codehaus/mojo/spotbugs/BaseViolationCheckMojo.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2005-2024 the original author or authors.
2+
* Copyright 2005-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -383,7 +383,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
383383

384384
if (outputFile.exists()) {
385385

386-
def xml = new XmlParser().parse(outputFile)
386+
Node xml = new XmlParser().parse(outputFile)
387387

388388
def bugs = xml.BugInstance
389389
int bugCount = bugs.size()
@@ -452,7 +452,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
452452
!sourceFiles.isEmpty()
453453
}
454454

455-
private void printBugs(total, bugs) {
455+
private void printBugs(int total, def bugs) {
456456
for (i in 0..total - 1) {
457457
def bug = bugs[i]
458458
log.error(bug.LongMessage.text() + SpotBugsInfo.BLANK + bug.SourceLine.'@classname' + SpotBugsInfo.BLANK + bug.SourceLine.Message.text() + SpotBugsInfo.BLANK + bug.'@type')

0 commit comments

Comments
 (0)