> @@ -206,4 +217,13 @@ public String toString() {
>                          "sessionTimeout", sessionTimeout).toString();
>     }
>  
> +   private static List<AuthMethod> getAuthMethods(AgentProxy agent) throws 
> Exception {
> +      Identity[] identities = agent.getIdentities();
> +      List<AuthMethod> result = Lists.newArrayList();
> +      for (Identity identity : identities) {
> +         result.add(new AuthAgent(agent, identity));
> +      }
> +      return result;

Use a builder? E.g.
```
ImmutableList.Builder<AuthMethod> identities = ImmutableList.builder();
for (Identity identity : agent.getIdentities()) {
  identities.add(new AuthAgent(agent, identity));
}
return identities.build();
```

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

Reply via email to