> @@ -32,8 +34,9 @@
>  
>     @Override
>     public <R extends HttpRequest> R bindToRequest(R request, Map<String, 
> Object> postParams) {
> -      BucketTemplate postBucket = (BucketTemplate) 
> postParams.get("template");
> -      return bindToRequest(request, postBucket);
> +      BucketTemplate postBucket = (BucketTemplate) 
> postParams.get("template");      
> +      postBucket.name(checkNotNull(postBucket.getName(), 
> "BucketName").toString());      

Is there a chance that the input bucket is `null` here even if the server or 
app isn't broken? If so, throw a different exception (IllegalArgument or 
IllegalState or so?). If this should only happen with a broken situation, we 
don't need `checkNotNull` because it will throw an NPE in any case when 
`toString()` is called?

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

Reply via email to