From bd5bf0dad2bb174eef6d089ecb7dfbe9e1e59392 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Tue, 17 Jul 2012 11:45:38 -0700 Subject: [PATCH] Ensure we close streams via InputSupplier methods --- .../java/org/jclouds/filesystem/FilesystemAsyncBlobStore.java | 2 +- .../java/org/jclouds/blobstore/TransientAsyncBlobStore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemAsyncBlobStore.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemAsyncBlobStore.java index aad185533a..56ba336cac 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemAsyncBlobStore.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/FilesystemAsyncBlobStore.java @@ -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)); } diff --git a/blobstore/src/main/java/org/jclouds/blobstore/TransientAsyncBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/TransientAsyncBlobStore.java index 430c205866..0891bfaf9c 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/TransientAsyncBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/TransientAsyncBlobStore.java @@ -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)); }