mirror of https://github.com/apache/jclouds.git
Ensure we close streams via InputSupplier methods
This commit is contained in:
parent
01f121a654
commit
bd5bf0dad2
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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