From ea09ff222b6b64a0657541efef472dd4f313a227 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Thu, 1 Dec 2022 13:37:06 +0100 Subject: [PATCH] #313 removed unused asignment to DatumWriter --- .../kloadgen/serializer/GenericAvroRecordBinarySerializer.java | 2 +- .../coru/kloadgen/serializer/GenericAvroRecordSerializer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordBinarySerializer.java b/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordBinarySerializer.java index 3d25ebd7..0363ab57 100644 --- a/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordBinarySerializer.java +++ b/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordBinarySerializer.java @@ -24,7 +24,7 @@ public class GenericAvroRecordBinarySerializer implemen @Override public final byte[] serialize(final String s, final T data) { - DatumWriter writer = new GenericDatumWriter<>(data.getSchema()); + DatumWriter writer; if (data instanceof SpecificRecord) { writer = new SpecificDatumWriter<>(data.getSchema()); } else { diff --git a/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordSerializer.java b/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordSerializer.java index 6c43b442..dc4cca0a 100644 --- a/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordSerializer.java +++ b/src/main/java/net/coru/kloadgen/serializer/GenericAvroRecordSerializer.java @@ -26,7 +26,7 @@ public class GenericAvroRecordSerializer implements Ser @Override public final byte[] serialize(final String topic, final T data) { - DatumWriter writer = new GenericDatumWriter<>(data.getSchema()); + DatumWriter writer; if (data instanceof SpecificRecord) { writer = new SpecificDatumWriter<>(data.getSchema()); } else {