From 9837cf89b7423ea7aeaa0e5f654cfcca9d4abd81 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Thu, 7 May 2009 08:07:47 +0000 Subject: [PATCH] check null before adding InputStream to entryset git-svn-id: http://jclouds.googlecode.com/svn/trunk@474 3d8758e0-26b5-11de-8745-db77d3ebf521 --- .../org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java | 5 +++-- 1 file changed, 3 insertions(+), 2 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 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; }