Skip to content

Commit 634c4e3

Browse files
committed
Small code cleanup
1 parent 1a6d381 commit 634c4e3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
780780
File auxClasspathFile = createSpotbugsAuxClasspathFile()
781781

782782
if (auxClasspathFile) {
783-
log.debug(" Adding 'auxclasspathFromFile'")
783+
log.debug(" Adding 'auxclasspathFromFile'")
784784
args << '-auxclasspathFromFile'
785785
args << auxClasspathFile.getAbsolutePath()
786786
}
@@ -836,9 +836,9 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
836836
log.debug(" Adding 'onlyAnalyze'")
837837
args << '-onlyAnalyze'
838838
args << Arrays.stream(onlyAnalyze.split(SpotBugsInfo.COMMA)).map {
839-
it.startsWith("file:") ? Files.lines(resourceHelper.getResourceFile(it.substring(5)).toPath())
839+
it.startsWith('file:') ? Files.lines(resourceHelper.getResourceFile(it.substring(5)).toPath())
840840
.collect(Collectors.joining(SpotBugsInfo.COMMA)) : it
841-
}.collect(Collectors.joining(","))
841+
}.collect(Collectors.joining(','))
842842
}
843843

844844
if (includeFilterFile) {
@@ -902,7 +902,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
902902
if (addSourceDirs) {
903903
log.debug(' Adding Source directories (To process source exclusions)')
904904
args << '-sourcepath'
905-
String sourceRoots = ""
905+
String sourceRoots = ''
906906
session.getCurrentProject().compileSourceRoots.each() { sourceRoots += it + File.pathSeparator }
907907
if (includeTests) {
908908
session.getCurrentProject().testCompileSourceRoots.each() { sourceRoots + it + File.pathSeparator }
@@ -1015,7 +1015,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
10151015

10161016
resourceManager.addSearchPath(FileResourceLoader.ID, session.getCurrentProject().getFile()
10171017
.getParentFile().getAbsolutePath())
1018-
resourceManager.addSearchPath(SpotBugsInfo.URL, "")
1018+
resourceManager.addSearchPath(SpotBugsInfo.URL, '')
10191019

10201020
resourceManager.setOutputDirectory(new File(session.getCurrentProject().getBuild().directory))
10211021

@@ -1051,7 +1051,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
10511051
}
10521052

10531053
ant.java(classname: 'edu.umd.cs.findbugs.FindBugs2', fork: "${fork}", failonerror: 'true',
1054-
clonevm: 'false', timeout: "${timeout}", maxmemory: "${maxHeap}m") {
1054+
clonevm: 'false', timeout: timeout, maxmemory: "${maxHeap}m") {
10551055

10561056
log.debug('File Encoding is ' + effectiveEncoding.name())
10571057

@@ -1146,7 +1146,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
11461146

11471147
BufferedWriter writer = Files.newBufferedWriter(outputFile.toPath(), effectiveEncoding)
11481148

1149-
if (effectiveEncoding.name().equalsIgnoreCase("Cp1252")) {
1149+
if (effectiveEncoding.name().equalsIgnoreCase('Cp1252')) {
11501150
writer.write '<?xml version="1.0" encoding="windows-1252"?>'
11511151
} else {
11521152
writer.write '<?xml version="1.0" encoding="' +
@@ -1190,7 +1190,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
11901190

11911191
if (newFileName != null) {
11921192
if (log.isDebugEnabled()) {
1193-
log.info("$originalFullPath modified to $newFileName")
1193+
log.info("${originalFullPath} modified to ${newFileName}")
11941194
}
11951195
loc.physicalLocation.artifactLocation.uri = newFileName
11961196
} else {

0 commit comments

Comments
 (0)