Skip to content

Commit 707184f

Browse files
committed
Update deprecation description of JedisConnectionFactory.setDatabase(…).
Mention database index instead of client name. Closes #2831
1 parent 014634e commit 707184f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/springframework/data/redis/connection/jedis/JedisConnectionFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ public int getDatabase() {
494494
* Sets the index of the database used by this connection factory. Default is 0.
495495
*
496496
* @param index database index.
497-
* @deprecated since 2.0, configure the client name using {@link RedisSentinelConfiguration} or
498-
* {@link RedisStandaloneConfiguration}.
497+
* @deprecated since 2.0, configure the database index using {@link RedisStandaloneConfiguration} or
498+
* {@link RedisSentinelConfiguration}.
499499
*/
500500
@Deprecated
501501
public void setDatabase(int index) {
@@ -1006,8 +1006,8 @@ private void assertInitialized() {
10061006
switch (current) {
10071007
case CREATED, STOPPED -> throw new IllegalStateException(
10081008
String.format("JedisConnectionFactory has been %s. Use start() to initialize it", current));
1009-
case DESTROYED -> throw new IllegalStateException(
1010-
"JedisConnectionFactory was destroyed and cannot be used anymore");
1009+
case DESTROYED ->
1010+
throw new IllegalStateException("JedisConnectionFactory was destroyed and cannot be used anymore");
10111011
default -> throw new IllegalStateException(String.format("JedisConnectionFactory is %s", current));
10121012
}
10131013
}

0 commit comments

Comments
 (0)