|
@@ -162,7 +162,7 @@ public class DefaultDownloadHandler implements DownloadHandler, ApplicationListe
|
|
@Override
|
|
@Override
|
|
public void download(long id, @NonNull HttpServletResponse response) throws IOException {
|
|
public void download(long id, @NonNull HttpServletResponse response) throws IOException {
|
|
Download download = this.download(id);
|
|
Download download = this.download(id);
|
|
- AssertUtils.available(download, () -> ApplicationContextHolder.getMessage("Download.Expired"));
|
|
|
|
|
|
+ AssertUtils.nonnull(download, () -> ApplicationContextHolder.getMessage("Download.Expired"));
|
|
boolean completed = ObjectUtils.ifNull(download, Download::getStatus) == Download.Status.COMPLETED;
|
|
boolean completed = ObjectUtils.ifNull(download, Download::getStatus) == Download.Status.COMPLETED;
|
|
AssertUtils.available(completed, () -> ApplicationContextHolder.getMessage("Download.Uncompleted"));
|
|
AssertUtils.available(completed, () -> ApplicationContextHolder.getMessage("Download.Uncompleted"));
|
|
String filename = ObjectUtils.ifNull(download, Download::getFilename);
|
|
String filename = ObjectUtils.ifNull(download, Download::getFilename);
|