small performance improvement,
avoid recalculation of fileName in File.getName()
This commit is contained in:
parent
00fb7f0c18
commit
ebfc07bcbd
|
|
@ -76,9 +76,10 @@ public abstract class AbstractFileSetCheck
|
|||
ArrayList files = new ArrayList(aFiles.length);
|
||||
for (int i = 0; i < aFiles.length; i++) {
|
||||
File file = aFiles[i];
|
||||
final String fileName = file.getName();
|
||||
for (int j = 0; j < mFileExtensions.length; j++) {
|
||||
String fileExtension = mFileExtensions[j];
|
||||
if (file.getName().endsWith(fileExtension)) {
|
||||
if (fileName.endsWith(fileExtension)) {
|
||||
files.add(file);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue