> @@ -121,8 +121,8 @@ private LoginCredentials(String username, @Nullable 
> Optional<String> password, @
>                      ? privateKey.get()
>                      : (password != null && password.isPresent() ? 
> password.get() : null));
>        this.authenticateSudo = authenticateSudo;
> -      this.password = password;
> -      this.privateKey = privateKey;
> +      this.password = (password != null) ? password : 
> Optional.<String>absent();
> +      this.privateKey = (privateKey != null) ? privateKey : 
> Optional.<String>absent();

This is different because `password` is of type `Optional`. Doing 
`this.password = Optional.fromNullable(password)` would create an Optional 
whose value was an Optional whose value was a string.

However, the constructor is private so I will push the `Optional.fromNullable` 
up into the builder, and remove the `@Nullable` annotation on the constructor's 
parameter.

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

Reply via email to