> +         BucketTemplateInternal template = new BucketTemplateInternal(src);
> +         JsonObject bucketTemplate = (JsonObject) 
> context.serialize(template, BucketTemplateInternal.class);
> +
> +         // deal with bucketAccessControls
> +         if (!(src.getAcl() == null) && (src.getAcl().isEmpty())) {
> +            bucketTemplate.add("acl", null);
> +         }
> +         // deal with DefaultObjectAccessControls
> +         if (!(src.getDefaultObjectAccessControls() == null) && 
> (src.getDefaultObjectAccessControls().isEmpty())) {
> +            bucketTemplate.add("defaultObjectAccessControls", null);
> +         }
> +
> +         // deal with Cors
> +         if (!(src.getCors() == null) && (src.getCors().isEmpty())) {
> +            bucketTemplate.add("cors", null);
> +         }

Just out of curiosity...why do we need to support both null and empty sets 
here? Could both be returned by the API?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/33/files#r14633554

Reply via email to