Ensure we close streams via InputSupplier methods

This commit is contained in:
Andrew Gaul 2012-07-17 11:45:38 -07:00 committed by Andrew Gaul
parent 01f121a654
commit bd5bf0dad2
2 changed files with 2 additions and 2 deletions

View File

@ -540,7 +540,7 @@ public class FilesystemAsyncBlobStore extends BaseAsyncBlobStore {
if (options.getRanges() != null && options.getRanges().size() > 0) {
byte[] data;
try {
data = toByteArray(blob.getPayload().getInput());
data = toByteArray(blob.getPayload());
} catch (IOException e) {
return immediateFailedFuture(new RuntimeException(e));
}

View File

@ -580,7 +580,7 @@ public class TransientAsyncBlobStore extends BaseAsyncBlobStore {
if (options.getRanges() != null && options.getRanges().size() > 0) {
byte[] data;
try {
data = toByteArray(blob.getPayload().getInput());
data = toByteArray(blob.getPayload());
} catch (IOException e) {
return immediateFailedFuture(new RuntimeException(e));
}