diff --git a/src/test/java/io/lettuce/test/LettuceExtension.java b/src/test/java/io/lettuce/test/LettuceExtension.java index 8dc6198d2c..e6994c69d9 100644 --- a/src/test/java/io/lettuce/test/LettuceExtension.java +++ b/src/test/java/io/lettuce/test/LettuceExtension.java @@ -73,13 +73,14 @@ * public CustomCommandTest(StatefulRedisConnection<String, String> connection) { * this.redis = connection.sync(); * } + * * } * * *

Resource lifecycle

* * This extension allocates resources lazily and stores them in its {@link ExtensionContext} - * {@link org.junit.jupiter.api.extension.ExtensionContext.Store} for resuse across multiple tests. Client and + * {@link org.junit.jupiter.api.extension.ExtensionContext.Store} for reuse across multiple tests. Client and * {@link ClientResources} are allocated through{@link DefaultRedisClient} respective {@link TestClientResources} so shutdown is * managed by the actual suppliers. Singleton connection resources are closed after the test class (test container) is finished. * Newable connection resources are closed after the actual test is finished. @@ -113,7 +114,7 @@ public class LettuceExtension implements ParameterResolver, AfterAllCallback, Af RedisClusterClientSupplier.INSTANCE, RedisClientSupplier.INSTANCE, StatefulRedisConnectionSupplier.INSTANCE, StatefulRedisPubSubConnectionSupplier.INSTANCE, StatefulRedisClusterConnectionSupplier.INSTANCE); - private static final List> RESOURCE_FUNCTIONS = Arrays.asList(RedisCommandsFunction.INSTANCE); + private static final List> RESOURCE_FUNCTIONS = Collections.singletonList(RedisCommandsFunction.INSTANCE); @Override public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) @@ -138,9 +139,7 @@ public Object resolveParameter(ParameterContext parameterContext, ExtensionConte throws ParameterResolutionException { ExtensionContext.Store store = getStore(extensionContext); - Parameter parameter = parameterContext.getParameter(); - Type parameterizedType = parameter.getParameterizedType(); if (parameterContext.isAnnotated(New.class)) {