Fix multipart file resource close (#1683)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-03-13 09:14:57 +02:00
committed by GitHub
parent 8b3a6f084d
commit bcc89ddba0

View File

@@ -360,11 +360,13 @@ public class SoftwareModuleView extends TableView<MgmtSoftwareModule, Long> {
@Override
public byte[] getBytes() throws IOException {
return getInputStream().readAllBytes();
try (final InputStream is = getInputStream()) {
return is.readAllBytes();
}
}
@Override
public InputStream getInputStream() throws IOException {
public InputStream getInputStream() {
return fileBuffer.getInputStream();
}