Merge pull request #1305 from maginatics/unneeded-function-example

Replace unneeded Function with imperative approach
This commit is contained in:
Adrian Cole 2013-02-05 11:32:06 -08:00
commit 49990d97e4
1 changed files with 6 additions and 9 deletions

View File

@ -191,15 +191,12 @@ public class LocalAsyncBlobStore extends BaseAsyncBlobStore {
contents = newTreeSet(filter(contents, new DelimiterFilter(prefix, delimiter))); contents = newTreeSet(filter(contents, new DelimiterFilter(prefix, delimiter)));
Iterables.<StorageMetadata> addAll(contents, transform(commonPrefixes, for (String o : commonPrefixes) {
new Function<String, StorageMetadata>() { MutableStorageMetadata md = new MutableStorageMetadataImpl();
public StorageMetadata apply(String o) { md.setType(StorageType.RELATIVE_PATH);
MutableStorageMetadata md = new MutableStorageMetadataImpl(); md.setName(o);
md.setType(StorageType.RELATIVE_PATH); contents.add(md);
md.setName(o); }
return md;
}
}));
} }
// trim metadata, if the response isn't supposed to be detailed. // trim metadata, if the response isn't supposed to be detailed.