frankvicky commented on code in PR #19634: URL: https://github.com/apache/kafka/pull/19634#discussion_r2074803762
########## clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java: ########## @@ -2292,7 +2292,7 @@ private static DescribeLogDirsResponse prepareDescribeLogDirsResponse(Errors err private static DescribeLogDirsResponse prepareEmptyDescribeLogDirsResponse(Optional<Errors> error) { DescribeLogDirsResponseData data = new DescribeLogDirsResponseData(); - if (error.isPresent()) data.setErrorCode(error.get().code()); + error.ifPresent(e -> data.setErrorCode(e.code())); return new DescribeLogDirsResponse(data); } Review Comment: L506 has an assertion in the wrong order. Please fix it. ########## clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java: ########## @@ -1172,8 +1172,7 @@ public synchronized ListPartitionReassignmentsResult listPartitionReassignments( Optional<Set<TopicPartition>> partitions, Review Comment: L1122 `future.complete(Objects.requireNonNullElseGet(info, () -> new ReplicaLogDirInfo(currentLogDir, 0, null, 0)));` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org