diff --git a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java index 9a9fa6373..fa48a6031 100644 --- a/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java +++ b/spring-cloud-stream-binder-kafka/src/test/java/org/springframework/cloud/stream/binder/kafka/AbstractKafkaTestBinder.java @@ -15,8 +15,6 @@ */ package org.springframework.cloud.stream.binder.kafka; -import java.util.List; - import org.springframework.cloud.stream.binder.AbstractTestBinder; import org.springframework.cloud.stream.binder.ExtendedConsumerProperties; import org.springframework.cloud.stream.binder.ExtendedProducerProperties; @@ -24,13 +22,9 @@ import org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerPro import org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties; import org.springframework.context.ApplicationContext; import org.springframework.integration.codec.Codec; -import org.springframework.integration.codec.kryo.KryoRegistrar; import org.springframework.integration.codec.kryo.PojoCodec; import org.springframework.integration.tuple.TupleKryoRegistrar; -import com.esotericsoftware.kryo.Kryo; -import com.esotericsoftware.kryo.Registration; - /** * @author Soby Chacko * @author Gary Russell @@ -54,21 +48,7 @@ public abstract class AbstractKafkaTestBinder extends } protected static Codec getCodec() { - return new PojoCodec(new TupleRegistrar()); - } - - private static class TupleRegistrar implements KryoRegistrar { - private final TupleKryoRegistrar delegate = new TupleKryoRegistrar(); - - @Override - public void registerTypes(Kryo kryo) { - this.delegate.registerTypes(kryo); - } - - @Override - public List getRegistrations() { - return this.delegate.getRegistrations(); - } + return new PojoCodec(new TupleKryoRegistrar()); } }