> +                     throw Throwables.propagate(ex);
> +                  } catch (IOException ex) {
> +                     throw Throwables.propagate(ex);
> +                  }
> +                  throw new HttpException("Glance endpoint does not support 
> API version: " + apiVersion);
> +              }
> +         });
> +   }
> +
> +   @Override
> +   public URI apply(Object from) {
> +      checkArgument(from instanceof String, "you must specify a zone, as a 
> String argument");
> +      Map<String, Supplier<URI>> zoneToEndpoint = 
> zoneToEndpointSupplier.get();
> +      checkState(!zoneToEndpoint.isEmpty(), "no zone name to endpoint 
> mappings configured!");
> +      checkArgument(zoneToEndpoint.containsKey(from),
> +               "requested location %s, which is not in the configured 
> locations: %s", from, zoneToEndpoint);

Do we need both of these checks? Yes, one throws an ISE and the other an IAE, 
but would e.g. the IAE be enough?

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

Reply via email to