JCLOUDS-1626: Close stream in MultiBlobInputStream

Otherwise the inner FileInputStream will leak if the caller only reads
part of the stream before closing the outer MultiBlobInputStream.
This commit is contained in:
Andrew Gaul 2024-03-03 12:42:06 +09:00
parent 4f3955799b
commit 4c7fb2c8b9
1 changed files with 8 additions and 0 deletions

View File

@ -1036,5 +1036,13 @@ public final class LocalBlobStore implements BlobStore {
return result;
}
}
@Override
public void close() throws IOException {
if (current != null) {
current.close();
current = null;
}
}
}
}