Skip to content

Commit

Permalink
Merge pull request #703 from hazendaz/master
Browse files Browse the repository at this point in the history
[cleanup] More def to proper type
  • Loading branch information
hazendaz authored Dec 17, 2023
2 parents 2526fe7 + dd17303 commit 70e3c43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class SpotBugsGui extends AbstractMojo implements SpotBugsPluginsTrait {

AntBuilder ant = new AntBuilder()

def auxClasspathElements = project.compileClasspathElements
List<String> auxClasspathElements = project.compileClasspathElements

if ( debug ) {
log.debug(" Plugin Artifacts to be added ->" + pluginArtifacts.toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
*/
private ArrayList<String> getSpotbugsArgs(File htmlTempFile, File xmlTempFile, File sarifTempFile) {
ResourceHelper resourceHelper = new ResourceHelper(log, spotbugsXmlOutputDirectory, resourceManager)
def auxClasspathFile = createSpotbugsAuxClasspathFile()
List<String> args = new ArrayList<>()
File auxClasspathFile = createSpotbugsAuxClasspathFile()

if (userPrefs) {
log.debug(" Adding User Preferences File -> ${userPrefs}" )
Expand Down Expand Up @@ -1046,7 +1046,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
*
*/
private File createSpotbugsAuxClasspathFile() {
def auxClasspathElements
List<String> auxClasspathElements

if (testClassFilesDirectory.exists() && testClassFilesDirectory.isDirectory() && includeTests) {
auxClasspathElements = project.testClasspathElements
Expand All @@ -1061,7 +1061,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
auxClasspathFile.deleteOnExit()
log.debug(" AuxClasspath Elements ->" + auxClasspathElements)

def auxClasspathList = auxClasspathElements.findAll { project.build.outputDirectory != it.toString() }
List<String> auxClasspathList = auxClasspathElements.findAll { project.build.outputDirectory != it.toString() }
if (auxClasspathList.size() > 0) {
log.debug(" Last AuxClasspath is ->" + auxClasspathList[auxClasspathList.size() - 1])

Expand Down Expand Up @@ -1149,7 +1149,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
startTime = System.nanoTime()
}

def spotbugsArgs = getSpotbugsArgs(htmlTempFile, xmlTempFile, sarifTempFile)
List<String> spotbugsArgs = getSpotbugsArgs(htmlTempFile, xmlTempFile, sarifTempFile)

String effectiveEncoding = System.getProperty("file.encoding", "UTF-8")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,11 @@ class SpotbugsReportGenerator implements SpotBugsInfo {
return
}

def line = bugInstance.SourceLine[0]
String type = bugInstance.@type.text()
String category = bugInstance.@category.text()
String message = bugInstance.LongMessage.text()
String priority = bugInstance.@priority.text()
def line = bugInstance.SourceLine[0]
log.debug("BugInstance message is ${message}")

sink.tableRow()
Expand Down

0 comments on commit 70e3c43

Please sign in to comment.