From 086560214105947dbc58f2761046d85d4cb8862a Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Thu, 17 Aug 2017 16:03:31 -0400 Subject: [PATCH] GH-62: Remove Tuple Kryo Registrar Wrapper Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/62 No longer needed. --- .../binder/kafka/AbstractKafkaTestBinder.java | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) 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()); } }