Skip to content

Commit 98afa1f

Browse files
jxblummp911de
authored andcommitted
Adapt to API changes in Spring Data Commons 3.0.
Closes #2173.
1 parent 6f54f43 commit 98afa1f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/test/java/org/springframework/data/redis/connection/jedis/extension/JedisConnectionFactoryExtension.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public class JedisConnectionFactoryExtension implements ParameterResolver {
109109
* @return the managed {@link JedisConnectionFactory}.
110110
*/
111111
public static JedisConnectionFactory getConnectionFactory(Class<? extends Annotation> qualifier) {
112-
return factories.get(qualifier).get();
112+
return factories.get(qualifier).getNew();
113113
}
114114

115115
/**
@@ -153,21 +153,20 @@ private static Class<? extends Annotation> getQualifier(ParameterContext paramet
153153
return RedisStanalone.class;
154154
}
155155

156-
static class NewableLazy<T> extends Lazy<T> {
156+
static class NewableLazy<T> {
157157

158-
private final Supplier<? extends T> supplier;
158+
private final Lazy<? extends T> lazy;
159159

160160
private NewableLazy(Supplier<? extends T> supplier) {
161-
super(supplier);
162-
this.supplier = supplier;
161+
this.lazy = Lazy.of(supplier);
163162
}
164163

165164
public static <T> NewableLazy<T> of(Supplier<? extends T> supplier) {
166165
return new NewableLazy<>(supplier);
167166
}
168167

169168
public T getNew() {
170-
return supplier.get();
169+
return lazy.get();
171170
}
172171
}
173172

0 commit comments

Comments
 (0)