mjsax commented on code in PR #18867:
URL: https://github.com/apache/kafka/pull/18867#discussion_r1952158997
##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamImpl.java:
##########
@@ -548,24 +548,13 @@ private KStream<K, V> doRepartition(final
Repartitioned<K, V> repartitioned) {
@Override
public void to(final String topic) {
- to(topic, Produced.with(keySerde, valueSerde, null));
+ to(new StaticTopicNameExtractor<>(topic), Produced.with(keySerde,
valueSerde, null));
}
- @SuppressWarnings("resource")
@Override
public void to(final String topic,
final Produced<K, V> produced) {
- Objects.requireNonNull(topic, "topic can't be null");
- Objects.requireNonNull(produced, "produced can't be null");
Review Comment:
Unifying this check, plus `ProducedInternal` code below into internal helper
method that is called by all public methods.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]