jsancio commented on code in PR #22505:
URL: https://github.com/apache/kafka/pull/22505#discussion_r3387886203
##########
raft/src/test/java/org/apache/kafka/raft/KafkaNetworkChannelTest.java:
##########
@@ -234,27 +235,32 @@ public void testFetchRequestDowngrade(short version) {
}
}
- private RaftRequest.Outbound sendTestRequest(ApiKeys apiKey, Node
destination) {
+ record SendRequestResult(RaftRequest.Outbound request,
CompletionStage<RaftResponse.Inbound> stage) { }
+
+ private SendRequestResult sendTestRequest(ApiKeys apiKey, Node
destination) {
int correlationId = channel.newCorrelationId();
long createdTimeMs = time.milliseconds();
ApiMessage apiRequest = buildTestRequest(apiKey);
- RaftRequest.Outbound request = new RaftRequest.Outbound(
+ var request = new RaftRequest.Outbound(
Review Comment:
I am not against it but I don't think we need to enforce it if it is in the
method body. We should definetly enforce and use final in class instance fields.
--
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]