From 412fb3a8160de7a2fde0b749b271c7b2d7c01d3f Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Thu, 7 May 2009 08:19:48 +0000 Subject: [PATCH] changed entrySet to use more tested logic git-svn-id: http://jclouds.googlecode.com/svn/trunk@476 3d8758e0-26b5-11de-8745-db77d3ebf521 --- .../org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/s3/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java b/s3/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java index 89518e49d9..0f3af00bf5 100644 --- a/s3/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java +++ b/s3/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java @@ -115,10 +115,9 @@ public class LiveS3InputStreamMap extends BaseS3Map implements */ public Set> entrySet() { Set> entrySet = new HashSet>(); - for (String key : keySet()) { - InputStream input = get(key); - if (input != null) - entrySet.add(new Entry(key, input)); + for (S3Object object : getAllObjects()) { + entrySet.add(new Entry(object.getKey(), (InputStream) object + .getData())); } return entrySet; }