> +         propagate(e);
> +      }
> +      return vm;
> +   }
> +
> +   private VirtualMachine getVMwareTemplate(String imageName, Folder 
> rootFolder) {
> +      VirtualMachine image = null;
> +      try {
> +         VirtualMachine node = getVM(imageName, rootFolder);
> +         if (VSpherePredicate.isTemplatePredicate.apply(node))
> +            image = node;
> +      } catch (NullPointerException e) {
> +         logger.error("cannot find an image called " + imageName, e);
> +         throw e;
> +      }
> +      return checkNotNull(image, "image");

Is it OK to throw a NPE here? What is the contract of this method?

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

Reply via email to