mjsax commented on a change in pull request #10813:
URL: https://github.com/apache/kafka/pull/10813#discussion_r661896938
##########
File path:
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryTimeOrderedKeyValueBuffer.java
##########
@@ -188,10 +188,11 @@ public boolean persistent() {
return false;
}
+ @SuppressWarnings("unchecked")
@Override
- public void setSerdesIfNull(final Serde<K> keySerde, final Serde<V>
valueSerde) {
- this.keySerde = this.keySerde == null ? keySerde : this.keySerde;
- this.valueSerde = this.valueSerde == null ?
FullChangeSerde.wrap(valueSerde) : this.valueSerde;
+ public void setSerdesIfNull(final ProcessorContext context) {
+ keySerde = (keySerde == null) ? (Serde<K>) context.keySerde() :
keySerde;
Review comment:
Why adding `()` for `(keySerde == null)` ?
--
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]