Просмотр исходного кода

Fixed a problem with example code in article "Letting The User Download A File" (#11971)

Fixes #10580
tags/8.11.0.beta1
Martín López 4 лет назад
Родитель
Сommit
dbfa4cf3f3
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 9 добавлений и 2 удалений
  1. 9
    2
      documentation/articles/LettingTheUserDownloadAFile.asciidoc

+ 9
- 2
documentation/articles/LettingTheUserDownloadAFile.asciidoc Просмотреть файл

@@ -104,8 +104,15 @@ public class OnDemandFileDownloader extends FileDownloader {
return super.handleConnectorRequest(request, response, path);
}

private StreamResource getResource () {
return (StreamResource) this.getResource("dl");
private StreamResource getResource() {
StreamResource result = null;
this.getSession().lock();
try {
result = (StreamResource) this.getResource("dl");
} finally {
this.getSession().unlock();
}
return result;
}
}
....

Загрузка…
Отмена
Сохранить