Skip to content

Commit a32693a

Browse files
authored
Merge pull request #1027 from hazendaz/master
Move rest of 'def' to actual object types
2 parents 55a5de3 + 08758c0 commit a32693a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
125125

126126
Node xml = new XmlParser().parse(outputFile)
127127

128-
def bugs = xml.BugInstance
128+
NodeList bugs = xml.BugInstance
129129
int bugCount = bugs.size()
130130
log.info("BugInstance size is ${bugCount}")
131131

@@ -151,7 +151,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
151151

152152
int bugCountAboveThreshold = 0
153153
for (i in 0..bugCount-1) {
154-
def bug = bugs[i]
154+
Node bug = bugs[i]
155155
int priorityNum = bug.'@priority' as Integer
156156
String priorityName = SpotBugsInfo.spotbugsPriority[priorityNum]
157157
String logMsg = priorityName + ': ' + bug.LongMessage.text() + SpotBugsInfo.BLANK +
@@ -195,9 +195,9 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
195195
!sourceFiles.isEmpty()
196196
}
197197

198-
private void printBugs(int total, def bugs) {
198+
private void printBugs(int total, NodeList bugs) {
199199
for (i in 0..total - 1) {
200-
def bug = bugs[i]
200+
Node bug = bugs[i]
201201
log.error(bug.LongMessage.text() + SpotBugsInfo.BLANK + bug.SourceLine.'@classname' + SpotBugsInfo.BLANK +
202202
bug.SourceLine.Message.text() + SpotBugsInfo.BLANK + bug.'@type')
203203
}

0 commit comments

Comments
 (0)