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 9120d45d21..89518e49d9 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 @@ -116,8 +116,9 @@ public class LiveS3InputStreamMap extends BaseS3Map implements public Set> entrySet() { Set> entrySet = new HashSet>(); for (String key : keySet()) { - Map.Entry entry = new Entry(key, get(key)); - entrySet.add(entry); + InputStream input = get(key); + if (input != null) + entrySet.add(new Entry(key, input)); } return entrySet; }