Skip to content

Commit

Permalink
Merge pull request #993 from hazendaz/next-up
Browse files Browse the repository at this point in the history
Define method parameters and use node instead of def
  • Loading branch information
hazendaz authored Feb 9, 2025
2 parents 25d3668 + 8c75598 commit c5ae627
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2024 the original author or authors.
* Copyright 2005-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -383,7 +383,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {

if (outputFile.exists()) {

def xml = new XmlParser().parse(outputFile)
Node xml = new XmlParser().parse(outputFile)

def bugs = xml.BugInstance
int bugCount = bugs.size()
Expand Down Expand Up @@ -452,7 +452,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
!sourceFiles.isEmpty()
}

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

0 comments on commit c5ae627

Please sign in to comment.