> +import com.google.common.base.Function;
> +import com.google.common.base.Supplier;
> +
> +@Singleton
> +public class VersionAwareRegionToEndpoint implements Function<Object, URI> {
> +
> +   private final Supplier<Map<String, Supplier<URI>>> 
> regionToEndpointSupplier;
> +
> +   @Inject
> +   public VersionAwareRegionToEndpoint(@Region Supplier<Map<String, 
> Supplier<URI>>> regionToEndpointSupplier) {
> +      this.regionToEndpointSupplier = checkNotNull(regionToEndpointSupplier, 
> "regionToEndpointSupplier");
> +   }
> +
> +   @Override
> +   public URI apply(@Nullable Object from) {
> +      checkArgument(from != null && from instanceof String, "you must 
> specify a region, as a String argument");

Note: Should also be fixed in RegionToEndpoint, then.

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

Reply via email to