mjsax commented on a change in pull request #10813:
URL: https://github.com/apache/kafka/pull/10813#discussion_r647928413



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/SinkNode.java
##########
@@ -60,8 +60,8 @@ public void init(final InternalProcessorContext context) {
         this.context = context;
         final Serializer<?> contextKeySerializer = 
ProcessorContextUtils.getKeySerializer(context);
         final Serializer<?> contextValueSerializer = 
ProcessorContextUtils.getValueSerializer(context);
-        keySerializer = prepareKeySerializer(keySerializer, 
contextKeySerializer, contextValueSerializer);
-        valSerializer = prepareValueSerializer(valSerializer, 
contextKeySerializer, contextValueSerializer);
+        keySerializer = prepareKeySerializer(keySerializer, 
contextKeySerializer, contextValueSerializer, this.name());
+        valSerializer = prepareValueSerializer(valSerializer, 
contextKeySerializer, contextValueSerializer, this.name());

Review comment:
       My argument was mainly about unifying code, ie, try to avoid 
`null`-checks on different places, but do the `null`-check on a unified place 
(to avoid that we forget the `null`-check).
   
   Might be good to get the opinion of other on this question.




-- 
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:
[email protected]


Reply via email to