diff --git a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/MessagePublisher.java b/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/MessagePublisher.java index a05f524f60..e1f2e3d4b2 100644 --- a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/MessagePublisher.java +++ b/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/MessagePublisher.java @@ -3,5 +3,5 @@ package org.baeldung.spring.data.redis.queue; public interface MessagePublisher { - void publish(String message); + void publish(final String message); } diff --git a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/RedisMessagePublisher.java b/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/RedisMessagePublisher.java index 4eb7f69cdb..58e789daab 100644 --- a/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/RedisMessagePublisher.java +++ b/spring-data-redis/src/main/java/org/baeldung/spring/data/redis/queue/RedisMessagePublisher.java @@ -16,13 +16,13 @@ public class RedisMessagePublisher implements MessagePublisher { public RedisMessagePublisher() { } - public RedisMessagePublisher(RedisTemplate redisTemplate, - ChannelTopic topic) { + public RedisMessagePublisher(final RedisTemplate redisTemplate, + final ChannelTopic topic) { this.redisTemplate = redisTemplate; this.topic = topic; } - public void publish(String message) { + public void publish(final String message) { redisTemplate.convertAndSend(topic.getTopic(), message); } } diff --git a/spring-data-redis/src/test/java/org/baeldung/spring/data/redis/RedisMessageListenerTest.java b/spring-data-redis/src/test/java/org/baeldung/spring/data/redis/RedisMessageListenerTest.java index 19612e0029..f355e7f63a 100644 --- a/spring-data-redis/src/test/java/org/baeldung/spring/data/redis/RedisMessageListenerTest.java +++ b/spring-data-redis/src/test/java/org/baeldung/spring/data/redis/RedisMessageListenerTest.java @@ -17,7 +17,6 @@ import static org.junit.Assert.assertTrue; @ContextConfiguration(classes = RedisConfig.class) public class RedisMessageListenerTest { - @Autowired private RedisMessagePublisher redisMessagePublisher;