Skip to content

Commit b25f847

Browse files
committed
make methods static when possible
1 parent f713848 commit b25f847

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ final class ResourceHelper {
124124
return outputResourcePath
125125
}
126126

127-
private createParentDirectories(Path outputResourcePath) {
127+
private static createParentDirectories(Path outputResourcePath) {
128128
Path parent = outputResourcePath.getParent()
129129
if (parent != null && Files.notExists(parent)) {
130130
Files.createDirectories(parent)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class SourceFileIndexer {
135135
* @param path Path to clean up
136136
* @return Path safe to use for comparison
137137
*/
138-
private String normalizePath(String path) {
138+
private static String normalizePath(String path) {
139139
return path.replace('\\', '/')
140140
}
141141

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
10711071
*
10721072
* @param file Destination file to create.
10731073
*/
1074-
private void forceFileCreation(File file) {
1074+
private static void forceFileCreation(File file) {
10751075
if (file.exists()) {
10761076
file.delete()
10771077
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class XDocsReporter {
8787
* The ThresholdValue integer to evaluate.
8888
* @return The string valueof the Threshold object.
8989
*/
90-
protected String evaluateThresholdParameter(String thresholdValue) {
90+
protected static String evaluateThresholdParameter(String thresholdValue) {
9191
switch (thresholdValue) {
9292
case '1': return 'High'
9393
case '2': return 'Normal'
@@ -103,7 +103,7 @@ class XDocsReporter {
103103
*
104104
* @return The Spotbugs Version used on the report.
105105
*/
106-
protected String getSpotBugsVersion() {
106+
protected static String getSpotBugsVersion() {
107107
return Version.VERSION_STRING
108108
}
109109

0 commit comments

Comments
 (0)