Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use try with resources
Browse files Browse the repository at this point in the history
Signed-off-by: Sooraj Sinha <[email protected]>
soosinha committed Jun 14, 2024
1 parent 8f3c702 commit 3a342c6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -72,7 +72,9 @@ public void writeAsync(final U entity, final ActionListener<Void> listener) {
public T read(final U entity) throws IOException {
// TODO Add timing logs and tracing
assert entity.getFullBlobName() != null;
return entity.deserialize(transferService.downloadBlob(getBlobPathForDownload(entity), entity.getBlobFileName()));
try (InputStream inputStream = transferService.downloadBlob(getBlobPathForDownload(entity), entity.getBlobFileName())) {
return entity.deserialize(inputStream);
}
}

@Override

0 comments on commit 3a342c6

Please sign in to comment.