mjsax commented on code in PR #20767:
URL: https://github.com/apache/kafka/pull/20767#discussion_r2496591667
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -208,11 +208,7 @@ private void performActionsOnTasks() {
addTask(taskAndAction.task());
break;
case REMOVE:
- if (taskAndAction.futureForRemove() == null) {
- removeTask(taskAndAction.taskId());
- } else {
- removeTask(taskAndAction.taskId(),
taskAndAction.futureForRemove());
- }
+ removeTask(taskAndAction.taskId(),
taskAndAction.futureForRemove());
Review Comment:
Why is this safe? How do we now that `taskAndAction.futureForRemove()` is
never `null`? If it would be `null`, we would hit a NPE inside `removeTask`
--
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]