Handle null filepath.

This commit is contained in:
Brian Pellin
2016-03-15 20:11:19 -05:00
parent 913a0f1155
commit 8688717db2

View File

@@ -123,6 +123,8 @@ public class UriUtil {
}
private static boolean isValidFilePath(String filepath) {
if (EmptyUtils.isNullOrEmpty(filepath)) { return false; }
File file = new File(filepath);
return file.exists() && file.canRead();
}