Fix incorrect input verification check in ClusterMetadata
Change-Id: I921ae8a8ba8c35bd91f27d2d1d985096f023c211
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -174,8 +174,8 @@ public final class ClusterMetadata { | ... | @@ -174,8 +174,8 @@ public final class ClusterMetadata { |
174 | */ | 174 | */ |
175 | private void verifyMetadata() { | 175 | private void verifyMetadata() { |
176 | verifyNotNull(metadata.getName(), "Cluster name must be specified"); | 176 | verifyNotNull(metadata.getName(), "Cluster name must be specified"); |
177 | - verify(CollectionUtils.isEmpty(metadata.getNodes()), "Cluster nodes must be specified"); | 177 | + verify(CollectionUtils.isNotEmpty(metadata.getNodes()), "Cluster nodes must be specified"); |
178 | - verify(CollectionUtils.isEmpty(metadata.getPartitions()), "Cluster partitions must be specified"); | 178 | + verify(CollectionUtils.isNotEmpty(metadata.getPartitions()), "Cluster partitions must be specified"); |
179 | 179 | ||
180 | // verify that partitions are constituted from valid cluster nodes. | 180 | // verify that partitions are constituted from valid cluster nodes. |
181 | boolean validPartitions = Collections2.transform(metadata.getNodes(), ControllerNode::id) | 181 | boolean validPartitions = Collections2.transform(metadata.getNodes(), ControllerNode::id) | ... | ... |
-
Please register or login to post a comment