rondagostino commented on a change in pull request #9370:
URL: https://github.com/apache/kafka/pull/9370#discussion_r499595845
##########
File path:
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -4160,15 +4231,18 @@ void handleFailure(Throwable throwable) {
}
@Override
- public DescribeUserScramCredentialsResult
describeUserScramCredentials(List<String> users,
DescribeUserScramCredentialsOptions options) {
+ public @NotNull DescribeUserScramCredentialsResult
describeUserScramCredentials(
+ final @Nullable List<@NotNull String> users,
+ final @NotNull DescribeUserScramCredentialsOptions options
+ ) {
final KafkaFutureImpl<DescribeUserScramCredentialsResponseData>
dataFuture = new KafkaFutureImpl<>();
final long now = time.milliseconds();
Call call = new Call("describeUserScramCredentials",
calcDeadlineMs(now, options.timeoutMs()),
new LeastLoadedNodeProvider()) {
@Override
public DescribeUserScramCredentialsRequest.Builder
createRequest(int timeoutMs) {
return new DescribeUserScramCredentialsRequest.Builder(
- new
DescribeUserScramCredentialsRequestData().setUsers(users.stream().map(user ->
+ new
DescribeUserScramCredentialsRequestData().setUsers(users == null ?
Collections.emptyList() : users.stream().map(user ->
Review comment:
Not 100% sure the parens are needed, but either they are or it increases
clarity/decreases confusion to add them.
```suggestion
new
DescribeUserScramCredentialsRequestData().setUsers((users == null ?
Collections.emptyList() : users).stream().map(user ->
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]