> + > +/** > + * @author Jeremy Daggett > + */ > +@Singleton > +public class RegionToCDNEndpoint implements Function<Object, URI> { > + > + private final Supplier<Map<String, Supplier<URI>>> endpointsSupplier; > + > + @Inject > + public RegionToCDNEndpoint(@ApiVersion final String apiVersion, final > RegionIdToURISupplier.Factory factory) { > + this.endpointsSupplier = > factory.createForApiTypeAndVersion(ServiceType.OBJECT_CDN, apiVersion); > + } > + > + public URI apply(@Nullable Object from) { > + checkArgument(from != null && from instanceof String, "you must > specify a region, as a String argument");
@nacx I must have removed a different Nullable! ;) Anyway, I borrowed the code directly from: https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/location/functions/RegionToEndpoint.java --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/79/files#r10061698