sjhajharia commented on code in PR #16204:
URL: https://github.com/apache/kafka/pull/16204#discussion_r1627866011
##########
shell/src/test/java/org/apache/kafka/shell/glob/GlobVisitorTest.java:
##########
@@ -99,11 +100,11 @@ public MetadataNode child(String name) {
}
static class InfoConsumer implements Consumer<Optional<MetadataNodeInfo>> {
- private Optional<List<MetadataNodeInfo>> infos = null;
+ private Optional<List<MetadataNodeInfo>> infos = Optional.empty();
Review Comment:
I made that change just for consistency with the variable declaration. We
have it defined as `Optional` and I felt `Optional.empty()` made more sense
than `null` here.
Even the IDE complains here: `Null is used for 'Optional' type in
declaration`.
lmk if it makes sense here.
Thanks!
--
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]