添加链接为空的情况处理

This commit is contained in:
huangzhuanghua
2016-10-19 15:22:24 +08:00
parent 0479cfca18
commit ded2fcdc7d

View File

@ -56,6 +56,12 @@ public class DownloadThread extends Thread {
fileOutputStream = new FileOutputStream(entry.getPath());
}
if (TextUtils.isEmpty(entry.getUrl())) {
listener.onStatusChanged(DownloadStatus.notfound);
Utils.log(DownloadThread.class.getSimpleName(),
"error-->url is empty");
return;
}
URL url = new URL(entry.getUrl());
Utils.log("url = " + entry.getUrl());