mirror of https://github.com/apache/jclouds.git
Merge pull request #1305 from maginatics/unneeded-function-example
Replace unneeded Function with imperative approach
This commit is contained in:
commit
49990d97e4
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue