From 64eb86e18b1c00a4d18367232c40315ce92f0261 Mon Sep 17 00:00:00 2001 From: mroiter-larus Date: Tue, 25 Jul 2023 17:47:16 +0200 Subject: [PATCH] Issue #549: Upgrade kafka-avro-serializer dependency --- common/src/main/kotlin/streams/extensions/CommonExtensions.kt | 2 +- .../kotlin/streams/service/sink/errors/KafkaErrorServiceTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/streams/extensions/CommonExtensions.kt b/common/src/main/kotlin/streams/extensions/CommonExtensions.kt index 010a662d..46e7ccb2 100644 --- a/common/src/main/kotlin/streams/extensions/CommonExtensions.kt +++ b/common/src/main/kotlin/streams/extensions/CommonExtensions.kt @@ -74,7 +74,7 @@ private fun convertAvroData(rawValue: Any?): Any? = when (rawValue) { .mapValues { convertAvroData(it.value) } is GenericFixed -> rawValue.bytes() is ByteBuffer -> rawValue.array() - is GenericEnumSymbol, is CharSequence -> rawValue.toString() + is GenericEnumSymbol<*>, is CharSequence -> rawValue.toString() else -> rawValue } fun IndexedRecord.toMap() = this.schema.fields diff --git a/common/src/test/kotlin/streams/service/sink/errors/KafkaErrorServiceTest.kt b/common/src/test/kotlin/streams/service/sink/errors/KafkaErrorServiceTest.kt index 38b78b10..bda9b230 100644 --- a/common/src/test/kotlin/streams/service/sink/errors/KafkaErrorServiceTest.kt +++ b/common/src/test/kotlin/streams/service/sink/errors/KafkaErrorServiceTest.kt @@ -25,7 +25,7 @@ class KafkaErrorServiceTest { val counter = AtomicInteger(0) Mockito.`when`(producer.send(ArgumentMatchers.any>())).then { counter.incrementAndGet() - FutureRecordMetadata(null, 0, RecordBatch.NO_TIMESTAMP, 0L, 0, 0, SystemTime()) + FutureRecordMetadata(null, 0, RecordBatch.NO_TIMESTAMP, 0, 0, SystemTime()) } val dlqService = KafkaErrorService(producer, ErrorService.ErrorConfig(fail=false,dlqTopic = "dlqTopic"), { s, e -> }) dlqService.report(listOf(dlqData()))