Skip to content

Commit

Permalink
Polishing #1242
Browse files Browse the repository at this point in the history
Add author tags. Reformat code.
  • Loading branch information
mp911de committed Mar 21, 2020
1 parent 71632e3 commit 904447a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/io/lettuce/core/RedisURI.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
* RedisURI supports Redis Standalone, Redis Sentinel and Redis Cluster with plain, SSL, TLS and unix domain socket connections.
*
* @author Mark Paluch
* @author Guy Korland
* @since 3.0
*/
@SuppressWarnings("serial")
Expand Down Expand Up @@ -579,10 +580,10 @@ private static RedisURI buildRedisUriFromUri(URI uri) {
}
}
if (LettuceStrings.isNotEmpty(password)) {
if(username == null) {
builder.withPassword(password);
if (username == null) {
builder.withPassword(password);
} else {
builder.withAuthentication(username, password);
builder.withAuthentication(username, password);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* Unit tests for {@link RedisURI.Builder}.
*
* @author Mark Paluch
* @author Guy Korland
*/
class RedisURIBuilderUnitTests {

Expand Down

0 comments on commit 904447a

Please sign in to comment.