You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/01/13 12:27:08 UTC
[GitHub] [pulsar] sijie commented on a change in pull request #6027: [Issue
5999] Support create/update tenant with empty cluster
sijie commented on a change in pull request #6027: [Issue 5999] Support create/update tenant with empty cluster
URL: https://github.com/apache/pulsar/pull/6027#discussion_r365777485
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
##########
@@ -220,10 +221,19 @@ public void deleteTenant(
}
}
+ private boolean isBlankCluster(Set<String> allowedClusters) {
Review comment:
Ah, I don't think this is a good fix.
A better fix would be:
```
Set<String> allowedClusters;
Set<String> nonBlankClusters = new HashSet<String>();
for (String c : allowedClusters) {
if (!StringUtils.isBlank(c)) {
nonBlankClusters.add(c);
}
}
if (info == null || nonBlankClusters.isEmpty()) {
info = new TenantInfo();
}
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services