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; }