> +      try {
> +         vm = (VirtualMachine) new 
> InventoryNavigator(nodesFolder).searchManagedEntity("VirtualMachine", vmName);
> +      } catch (Exception e) {
> +         logger.error("Can't find vm", e);
> +         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) {

We shouldn't be catching NPEs this way. Use a proper exception or return value.

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

Reply via email to