> +   @Inject
> +   DigitalOceanImageExtension(DigitalOceanApi api,
> +         @Named(TIMEOUT_IMAGE_AVAILABLE) Predicate<Integer> 
> imageAvailablePredicate,
> +         @Named(TIMEOUT_NODE_SUSPENDED) Predicate<Integer> 
> nodeStoppedPredicate,
> +         Function<org.jclouds.digitalocean.domain.Image, Image> 
> imageTransformer) {
> +      this.api = Preconditions.checkNotNull(api, "api cannot be null");
> +      this.imageAvailablePredicate = checkNotNull(imageAvailablePredicate, 
> "imageAvailablePredicate cannot be null");
> +      this.nodeStoppedPredicate = checkNotNull(nodeStoppedPredicate, 
> "nodeStoppedPredicate cannot be null");
> +      this.imageTransformer = checkNotNull(imageTransformer, 
> "imageTransformer cannot be null");
> +   }
> +
> +   @Override
> +   public ImageTemplate buildImageTemplateFromNode(String name, String id) {
> +      Droplet droplet = null;
> +      try {
> +         droplet = api.getDropletApi().get(Integer.valueOf(id));

Can we guarantee here that `id` will be a number string?

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

Reply via email to