mirror of
https://github.com/apache/jclouds.git
synced 2025-02-06 10:09:35 +00:00
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…
x
Reference in New Issue
Block a user