Refine RedisSerializer implementations.

This commit polishes up method ordering, introduces Javadoc where missing and updates nullability annotations and argument names.

Closes #1097
This commit is contained in:
Mark Paluch
2023-09-21 14:46:14 +02:00
parent 468254d0fe
commit d4ba034b28
13 changed files with 162 additions and 142 deletions

View File

@@ -108,8 +108,8 @@ class CacheTestParams {
@Override
@Nullable
public byte[] serialize(@Nullable Object o) throws SerializationException {
return serializer.serialize(o);
public byte[] serialize(@Nullable Object value) throws SerializationException {
return serializer.serialize(value);
}
@Override

View File

@@ -23,7 +23,6 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.data.redis.connection.DefaultMessage;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
@@ -311,7 +310,7 @@ class MessageListenerUnitTests {
static class PojoRedisSerializer implements RedisSerializer<Pojo> {
@Override
public byte[] serialize(Pojo t) throws SerializationException {
public byte[] serialize(Pojo value) throws SerializationException {
return new byte[0];
}