lct45 commented on a change in pull request #10813:
URL: https://github.com/apache/kafka/pull/10813#discussion_r661680517
##########
File path:
streams/src/main/java/org/apache/kafka/streams/kstream/internals/WrappingNullableSerde.java
##########
@@ -60,9 +60,12 @@ public void close() {
}
public void setIfUnset(final Serde<InnerK> defaultKeySerde, final
Serde<InnerV> defaultValueSerde) {
- Objects.requireNonNull(defaultKeySerde);
- Objects.requireNonNull(defaultValueSerde);
- serializer.setIfUnset(defaultKeySerde.serializer(),
defaultValueSerde.serializer());
- deserializer.setIfUnset(defaultKeySerde.deserializer(),
defaultValueSerde.deserializer());
+ if (defaultKeySerde != null && defaultValueSerde != null) {
Review comment:
The context issue is same as above - we need to be able to handle two
processor types. The reason I left these lumped together is because in the call
to `setIfUnset` we pass in the `serializer`/`deserializer`, so if we let there
be a null in either we'd get a NPE at the method call. I tried passing in just
the `default` for both but ran into issues wtih the generics. I can refactor to
allow one to be 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]