Merge pull request #723 from andrewgaul/filesystem-transient-input-supplier

Ensure we close streams via InputSupplier methods
This commit is contained in:
Adrian Cole 2012-07-17 15:23:47 -07:00
commit 007eba6d7c
2 changed files with 2 additions and 2 deletions

View File

@ -539,7 +539,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));
}