>                .toString();
>     }
>  
>     public static final DockerTemplateOptions NONE = new 
> DockerTemplateOptions();
>  
>     public DockerTemplateOptions volumes(Map<String, String> volumes) {
> -      this.volumes = Optional.<Map<String, String>> 
> of(ImmutableMap.copyOf(volumes));
> +      for (Map.Entry<String, String> entry : checkNotNull(volumes, 
> "volumes").entrySet()) {
> +         checkNotNull(entry.getKey(), "host paths must not be null");
> +         checkNotNull(entry.getValue(), "container paths must not be null");
> +      }

In general for the whole PR, are these checks really needed? Guava's immutable 
collections don't allow null values so checking the null input in the map and 
list options here looks redundant?

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

Reply via email to