Michał created KAFKA-8911: ----------------------------- Summary: Implicit TimeWindowedSerde creates Serde with null inner serializer Key: KAFKA-8911 URL: https://issues.apache.org/jira/browse/KAFKA-8911 Project: Kafka Issue Type: Bug Components: streams Affects Versions: 2.3.0 Reporter: Michał
{{Serdes.scala}} contains an implicit def timeWindowedSerde as below: {code:java} implicit def timeWindowedSerde[T]: WindowedSerdes.TimeWindowedSerde[T] = new WindowedSerdes.TimeWindowedSerde[T]() {code} It creates a new {{TimeWindowedSerde}} without inner serializer, which is a bug. Even in {{WindowedSerdes.java}} it says that empty constructor is for reflection. {code:java} // Default constructor needed for reflection object creation public TimeWindowedSerde() { super(new TimeWindowedSerializer<>(), new TimeWindowedDeserializer<>()); } public TimeWindowedSerde(final Serde<T> inner) { super(new TimeWindowedSerializer<>(inner.serializer()), new TimeWindowedDeserializer<>(inner.deserializer())); } {code} All above failes for me when I try to implicitly access the right Serde: {code:java} private val twSerde = implicitly[TimeWindowedSerde[String]] {code} and I have to create the object properly on my own {code} private val twSerde = new WindowedSerdes.TimeWindowedSerde[String](implicitly[Serde[String]]) {code} it could be fixed with a proper call in {{Serdes.scala}} {code} implicit def timeWindowedSerde[T](implicit tSerde: Serde[T]): WindowedSerdes.TimeWindowedSerde[T] = new WindowedSerdes.TimeWindowedSerde[T](tSerde) {code} But maybe also the scope of the default constructor for {{TimeWindowedSerde}} should be changed? BR, Michał -- This message was sent by Atlassian Jira (v8.3.2#803003)