lct45 commented on a change in pull request #9253:
URL: https://github.com/apache/kafka/pull/9253#discussion_r567013228



##########
File path: 
streams/streams-scala/src/main/scala/org/apache/kafka/streams/scala/Serdes.scala
##########
@@ -41,8 +43,19 @@ object Serdes {
   implicit def Integer: Serde[Int] = JSerdes.Integer().asInstanceOf[Serde[Int]]
   implicit def JavaInteger: Serde[java.lang.Integer] = JSerdes.Integer()
 
-  implicit def timeWindowedSerde[T](implicit tSerde: Serde[T]): 
WindowedSerdes.TimeWindowedSerde[T] =
-    new WindowedSerdes.TimeWindowedSerde[T](tSerde)
+  implicit def timeWindowedSerde[T](implicit inner: Serde[T]): 
Serde[Windowed[T]] =
+    new JSerdes.WrapperSerde[Windowed[T]](
+      new TimeWindowedSerializer[T](inner.serializer),
+      new TimeWindowedDeserializer[T](inner.deserializer) {
+        override def deserialize(topic: String, data: Array[Byte]): 
Windowed[T] = {

Review comment:
       Hmm, maybe we don't need custom code? I did this implementation back in 
the fall before 
[KIP-616](https://cwiki.apache.org/confluence/display/KAFKA/KIP-616%3A+Rename+implicit+Serdes+instances+in+kafka-streams-scala)
 was merged. You know the scala better than I do, but I think you're right that 
the deprecated warning in the `TimeWindowedDeserializer` will be enough now 
that KIP-616 added the `deprecated` annotation to this class




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to