> @@ -67,5 +70,19 @@ public SshClient create(HostAndPort socket, 
> LoginCredentials credentials) {
>           injector.injectMembers(client);// add logger
>           return client;
>        }
> +
> +      @Override
> +      public boolean existsSshAgent() {
> +         try {
> +            ConnectorFactory cf = ConnectorFactory.getDefault();
> +            if (cf != null) {
> +               Connector con = cf.createConnector();
> +               if (con != null) {
> +                  return con.isAvailable();
> +               }
> +            }
> +         } catch (AgentProxyException e) {}
> +         return false;

Put this in the catch block, to make it clear this is only the result if 
something goes wrong?

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

Reply via email to