You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/04/12 00:38:31 UTC
[groovy] 01/07: minor refactor: remove some codenarc warnings
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit defc91f616fd00f2da25539c9375f8ecccc65ec9
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Apr 1 23:01:11 2019 +1000
minor refactor: remove some codenarc warnings
---
.../src/main/groovy/groovy/util/FileNameFinder.groovy | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/subprojects/groovy-ant/src/main/groovy/groovy/util/FileNameFinder.groovy b/subprojects/groovy-ant/src/main/groovy/groovy/util/FileNameFinder.groovy
index f066f52..9fa5b0e 100644
--- a/subprojects/groovy-ant/src/main/groovy/groovy/util/FileNameFinder.groovy
+++ b/subprojects/groovy-ant/src/main/groovy/groovy/util/FileNameFinder.groovy
@@ -25,11 +25,11 @@ package groovy.util
class FileNameFinder implements IFileNameFinder {
List<String> getFileNames(String basedir, String pattern) {
- return getFileNames(dir: basedir, includes: pattern)
+ getFileNames(dir: basedir, includes: pattern)
}
List<String> getFileNames(String basedir, String pattern, String excludesPattern) {
- return getFileNames(dir: basedir, includes: pattern, excludes: excludesPattern)
+ getFileNames(dir: basedir, includes: pattern, excludes: excludesPattern)
}
List<String> getFileNames(Map args) {
@@ -37,10 +37,10 @@ class FileNameFinder implements IFileNameFinder {
def scanner = ant.fileScanner {
fileset(args)
}
- def fls = []
- for (f in scanner) {
- fls << f.getAbsolutePath()
+ List<String> files = []
+ for (File f in scanner) {
+ files << f.absolutePath
}
- return fls
+ files
}
-}
\ No newline at end of file
+}