MINOR: Avoid double null check in KStream::transform()#6429
MINOR: Avoid double null check in KStream::transform()#6429mjsax merged 1 commit intoapache:trunkfrom
Conversation
A call to KStream::transform() checked twice the parameter transformerSupplier for null. The double null check occurred because KStream::transform() is expressed in terms of KStream::flatTransform() and both methods performed the null check.
|
\cc @vvcephei and @ableegoldman for reviews |
|
I see the intent, but the disadvantage is, that we get deeper stack traces, ie, the user will see instead of Also, the PR only allows to share one line of code (so the benefits of the rewrite is small). Thoughts? |
|
@mjsax thank you for your comment. The NPEs are still thrown by |
mjsax
left a comment
There was a problem hiding this comment.
Ack.
Guess -- maybe it was too late to read a diff...
* warn-apache-kafka/trunk: (41 commits) MINOR: Avoid double null check in KStream#transform() (apache#6429) KAFKA-7944: Improve Suppress test coverage (apache#6382) KAFKA-3522: add missing guards for TimestampedXxxStore (apache#6356) MINOR: Change Trogdor agent's cleanup executor to a cached thread pool (apache#6309) KAFKA-7976; Update config before notifying controller of unclean leader update (apache#6426) KAFKA-7801: TopicCommand should not be able to alter transaction topic partition count KAFKA-8091; Wait for processor shutdown before testing removed listeners (apache#6425) MINOR: Update delete topics zk path in assertion error messages KAFKA-7939: Fix timing issue in KafkaAdminClientTest.testCreateTopicsRetryBackoff KAFKA-7922: Return authorized operations in Metadata request response (KIP-430 Part-2) MINOR: Print usage when parse fails during console producer MINOR: fix Scala compiler warning (apache#6417) KAFKA-7288; Fix check in SelectorTest to wait for no buffered bytes (apache#6415) KAFKA-8065: restore original input record timestamp in forward() (apache#6393) MINOR: cleanup deprectaion annotations (apache#6290) KAFKA-3522: Add TimestampedWindowStore builder/runtime classes (apache#6173) KAFKA-8069; Fix early expiration of offsets due to invalid loading of expire timestamp (apache#6401) KAFKA-8070: Increase consumer startup timeout in system tests (apache#6405) KAFKA-8040: Streams handle initTransactions timeout (apache#6372) KAFKA-7980 - Fix timing issue in SocketServerTest.testConnectionRateLimit (apache#6391) ...
Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Matthias J. Sax <matthias@confluent.io>
A call to KStream::transform() checked twice the parameter
transformerSupplier for null. The double null check occurred
because KStream::transform() is expressed in terms of
KStream::flatTransform() and both methods performed the null check.
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)