adoroszlai commented on code in PR #4157:
URL: https://github.com/apache/ozone/pull/4157#discussion_r1065608806
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/bucket/ListBucketHandler.java:
##########
@@ -56,12 +61,15 @@ protected void execute(OzoneClient client, OzoneAddress
address)
int counter = 0;
while (bucketIterator.hasNext() && counter < listOptions.getLimit()) {
OzoneBucket bucket = bucketIterator.next();
- if (bucket.isLink()) {
- bucketList.add(new InfoBucketHandler.LinkBucket(bucket));
- } else {
- bucketList.add(bucket);
+ if (!encryptedBuckets ||
+ (encryptedBuckets && (bucket.getEncryptionKeyName() != null))) {
Review Comment:
Nit: condition can be simplified. (Sorry for missing this earlier.)
```suggestion
if (!encryptedBuckets || bucket.getEncryptionKeyName() != null) {
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]