> +
> +
> +            NodeAndInitialCredentials<VirtualMachine> 
> nodeAndInitialCredentials = new 
> NodeAndInitialCredentials<VirtualMachine>(cloned, cloned.getName(),
> +                    LoginCredentials.builder().user("root")
> +                            .password(vmInitPassword)
> +                            .build());
> +            return nodeAndInitialCredentials;
> +         } catch (Throwable e) { // must catch Throwable
> +            throw closer.rethrow(e);
> +         } finally {
> +            closer.close();
> +         }
> +      } catch (Throwable t) {
> +         Throwables.propagateIfPossible(t);
> +      }
> +      return null;

This method is huge and hard to maintain. It does many things and can't manage 
all possible errors properly. Refactor it in small (and ideally reusable) 
pieces that do concrete work.

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

Reply via email to