DownloadUtil 优化
This commit is contained in:
@ -19,6 +19,7 @@ package com.arialyy.aria.util;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import com.arialyy.aria.core.DownloadEntity;
|
||||
import com.arialyy.aria.exception.FileException;
|
||||
import java.io.File;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@ -80,9 +81,9 @@ public class CheckUtil {
|
||||
return false;
|
||||
} else if (TextUtils.isEmpty(entity.getFileName())) {
|
||||
//Log.w(TAG, "文件名不能为空");
|
||||
throw new IllegalArgumentException("文件名不能为null");
|
||||
throw new FileException("文件名不能为null");
|
||||
} else if (TextUtils.isEmpty(entity.getDownloadPath())) {
|
||||
throw new IllegalArgumentException("文件保存路径不能为null");
|
||||
throw new FileException("文件保存路径不能为null");
|
||||
}
|
||||
String fileName = entity.getFileName();
|
||||
if (fileName.contains(" ")) {
|
||||
|
Reference in New Issue
Block a user