Skip to content

Commit b8a9d5f

Browse files
committed
Polishing.
Use standard assertions. Tweak Javadoc wording. See spring-projects#2494 Original pull request: spring-projects#2645
1 parent 5a12140 commit b8a9d5f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/org/springframework/data/redis/core/RedisAccessor.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
import org.apache.commons.logging.LogFactory;
2020
import org.springframework.beans.factory.InitializingBean;
2121
import org.springframework.data.redis.connection.RedisConnectionFactory;
22-
import org.springframework.data.redis.util.RedisAssertions;
2322
import org.springframework.lang.Nullable;
23+
import org.springframework.util.Assert;
2424

2525
/**
26-
* Base class for {@link RedisTemplate} defining common properties. Not intended to be used directly.
26+
* Base class for {@link RedisTemplate} implementations defining common properties. Not intended to be used directly.
2727
*
2828
* @author Costin Leau
2929
* @author John Blum
30-
* @see org.springframework.beans.factory.InitializingBean
3130
*/
3231
public abstract class RedisAccessor implements InitializingBean {
3332

@@ -62,7 +61,10 @@ public RedisConnectionFactory getConnectionFactory() {
6261
* @since 2.0
6362
*/
6463
public RedisConnectionFactory getRequiredConnectionFactory() {
65-
return RedisAssertions.requireState(getConnectionFactory(), "RedisConnectionFactory is required");
64+
65+
RedisConnectionFactory connectionFactory = getConnectionFactory();
66+
Assert.state(connectionFactory != null, "RedisConnectionFactory is required");
67+
return connectionFactory;
6668
}
6769

6870
/**

0 commit comments

Comments
 (0)