|
@@ -208,7 +208,9 @@ public class AdminDictKuromojiAction extends FessAdminAction {
|
|
|
validate(form, messages -> {}, () -> downloadpage(form.dictId));
|
|
|
return kuromojiService.getKuromojiFile(form.dictId).map(file -> {
|
|
|
return asStream(new File(file.getPath()).getName()).contentType("text/plain; charset=UTF-8").stream(out -> {
|
|
|
- out.write(file.getInputStream());
|
|
|
+ try (InputStream inputStream = file.getInputStream()) {
|
|
|
+ out.write(inputStream);
|
|
|
+ }
|
|
|
});
|
|
|
}).orElseGet(() -> {
|
|
|
throwValidationError(messages -> messages.addErrorsFailedToDownloadKuromojiFile(GLOBAL), () -> downloadpage(form.dictId));
|