Fixed a lot of bugs

This commit is contained in:
huangyuhui
2016-02-12 11:30:02 +08:00
parent 98282fd319
commit d20d06ace7
17 changed files with 109 additions and 44 deletions

View File

@@ -44,7 +44,6 @@ public final class UpdateChecker implements IUpdateChecker {
return new OverridableSwingWorker() {
@Override
protected void work() throws Exception {
if (value == null) {
versionString = NetUtils.get("http://huangyuhui.duapp.com/info.php?type=" + type);
value = VersionNumber.check(versionString);

View File

@@ -177,6 +177,8 @@ public class FileDownloadTask extends Task implements PreviousResult<File>, Prev
lastTime = now;
}
}
if (downloaded != contentLength)
throw new IllegalStateException("Unexptected file size: " + downloaded + ", expected: " + contentLength);
closeFiles();
if (aborted)
tempFile.delete();