jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-google] JCLOUDS-458:Added Blobstore Abstraction (#48)
Date Sat, 20 Sep 2014 03:20:39 GMT
> +import com.google.inject.Singleton;
> +import static com.google.common.base.Preconditions.checkNotNull;
> +
> +@Singleton
> +public class BlobStoreListContainerOptionsToListObjectOptions implements
> +         Function<ListContainerOptions, ListObjectOptions> {
> +   public ListObjectOptions apply(ListContainerOptions from) {
> +      checkNotNull(from, "set options to instance NONE instead of passing null");
> +      ListObjectOptions httpOptions = new ListObjectOptions();
> +
> +      if (!from.isRecursive()) {
> +         httpOptions = httpOptions.delimiter("/");
> +      }
> +      if (from.getDir() != null) {
> +         String path = from.getDir();
> +         if (!path.endsWith("/"))

[minor] Add `{...}`

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/48/files#r17817557
Mime
View raw message