Skip to content

Commit

Permalink
Polishing #1774
Browse files Browse the repository at this point in the history
Document implication of the credential retrieval duration on connection creation timeouts.
  • Loading branch information
mp911de committed Aug 24, 2022
1 parent a60560e commit ea4e1eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/RedisCredentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public interface RedisCredentials {
* @return the static {@link RedisCredentials} object from {@code username} and {@code password}
*/
static RedisCredentials just(String username, CharSequence password) {
return new StaticRedisCredentials(username, password == null ? new char[0] : LettuceStrings.toCharArray(password));
return new StaticRedisCredentials(username, password == null ? null : LettuceStrings.toCharArray(password));
}

/**
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/io/lettuce/core/RedisCredentialsProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
/**
* Interface for loading {@link RedisCredentials} that are used for authentication. A commonly-used implementation is
* {@link StaticCredentialsProvider} for a fixed set of credentials.
* <p>
* Credentials are requested by the driver after connecting to the server. Therefore, credential retrieval is subject to
* complete within the connection creation timeout to avoid connection failures.
*
* @author Mark Paluch
* @since 6.2
Expand Down

0 comments on commit ea4e1eb

Please sign in to comment.