> + return new Function<ListPage<Bucket>, > org.jclouds.blobstore.domain.PageSet<? extends StorageMetadata>>() { > + public org.jclouds.blobstore.domain.PageSet<? extends > StorageMetadata> apply(ListPage<Bucket> from) { > + return new > PageSetImpl<StorageMetadata>(Iterables.transform(from, > bucketToStorageMetadata), null); > + } > + }.apply(api.getBucketApi().listBucket(PROJECT_ID)); > + } > + > + @Override > + public boolean containerExists(String container) { > + return api.getBucketApi().bucketExist(container); > + } > + > + @Override > + public boolean createContainerInLocation(Location location, String > container) { > + > + if (containerExists(container)) {
Do we need this call? Does `createBucket` return an error code for a bucket already exists like S3 does? The current code follows the "time of check to time of use" (TOCTOU) anti-pattern which can introduce bugs. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-google/pull/48/files#r17210375