changed entrySet to use more tested logic

git-svn-id: http://jclouds.googlecode.com/svn/trunk@476 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-05-07 08:19:48 +00:00
parent 1c16caa6f0
commit 412fb3a816
1 changed files with 3 additions and 4 deletions

View File

@ -115,10 +115,9 @@ public class LiveS3InputStreamMap extends BaseS3Map<InputStream> implements
*/ */
public Set<Map.Entry<String, InputStream>> entrySet() { public Set<Map.Entry<String, InputStream>> entrySet() {
Set<Map.Entry<String, InputStream>> entrySet = new HashSet<Map.Entry<String, InputStream>>(); Set<Map.Entry<String, InputStream>> entrySet = new HashSet<Map.Entry<String, InputStream>>();
for (String key : keySet()) { for (S3Object object : getAllObjects()) {
InputStream input = get(key); entrySet.add(new Entry(object.getKey(), (InputStream) object
if (input != null) .getData()));
entrySet.add(new Entry(key, input));
} }
return entrySet; return entrySet;
} }