AndrewJSchofield commented on code in PR #18877: URL: https://github.com/apache/kafka/pull/18877#discussion_r1961407894
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/SinkNode.java: ########## @@ -56,18 +56,19 @@ public void addChild(final ProcessorNode<Void, Void, ?, ?> child) { throw new UnsupportedOperationException("sink node does not allow addChild"); } + @SuppressWarnings({"unchecked", "rawtypes"}) Review Comment: I can see that this builds, but there's a bit of a bad smell here I think. If I'm read it right: * The `ProcessorNode` has 4 type variables: `KIn`, `VIn`, `KOut`, `VOut` * The `InternalProcessorContext` has 2 of these type variables: `KOut`, `VOut` * The `SinkNode` is `<KIn, VIn, Void, Void>` * As a result the context for the `SinkNode` should be `<Void, Void>` * But `SinkNode.prepareKeySerializer` takes a `Serializer<KIn>` and `Context<KIn, ?>`. It seems to me that it should be `<Void, ?>` (because that's KOut) and the cast should not be required at all. I guess there's something broken in the typing information in this area of the code which necessitates this casting. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org