checkstyle corrections

Former-commit-id: 2d7107de4141937a5be66c42b170130118c7d613
This commit is contained in:
Jeremy Long
2014-03-29 05:23:49 -04:00
parent 6cfcc903df
commit db0ac70b71

View File

@@ -167,11 +167,11 @@ public class Engine {
*/
public void scan(String path) {
if (path.matches("^.*[\\/]\\*\\.[^\\/:*|?<>\"]+$")) {
String[] parts = path.split("\\*\\.");
String[] ext = new String[]{parts[parts.length - 1]};
File dir = new File(path.substring(0, path.length() - ext[0].length() - 2));
final String[] parts = path.split("\\*\\.");
final String[] ext = new String[]{parts[parts.length - 1]};
final File dir = new File(path.substring(0, path.length() - ext[0].length() - 2));
if (dir.isDirectory()) {
List<File> files = (List<File>) org.apache.commons.io.FileUtils.listFiles(dir, ext, true);
final List<File> files = (List<File>) org.apache.commons.io.FileUtils.listFiles(dir, ext, true);
scan(files);
} else {
final String msg = String.format("Invalid file path provided to scan '%s'", path);