mirror of https://github.com/apache/jclouds.git
Merge pull request #723 from andrewgaul/filesystem-transient-input-supplier
Ensure we close streams via InputSupplier methods
This commit is contained in:
commit
007eba6d7c
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue