Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -165,11 +164,12 @@ public void shutdown() {
}

@Override
@SuppressWarnings("NullAway")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we state in the comment to this annotation the reason?
Something similar to what I suggested in the review, but might be more specific to this situation.

public boolean dispatch(Message<?> message) {
populatedPartitions();
int partition = Math.abs(this.partitionKeyFunction.apply(message).hashCode()) % this.partitionCount;
UnicastingDispatcher partitionDispatcher = this.partitions.get(partition);
return Objects.requireNonNull(partitionDispatcher).dispatch(message);
return partitionDispatcher.dispatch(message);
}

private void populatedPartitions() {
Expand Down