jiajunwang commented on a change in pull request #1123:
URL: https://github.com/apache/helix/pull/1123#discussion_r446005583
##########
File path:
helix-core/src/test/java/org/apache/helix/controller/rebalancer/waged/TestAssignmentMetadataStore.java
##########
@@ -172,13 +197,17 @@ public void testAssignmentCache() {
/**
* Returns a list of existing version numbers only.
+ *
* @param metadataType
* @return
*/
private List<String> getExistingVersionNumbers(String metadataType) {
List<String> children = _baseAccessor
.getChildNames("/" + CLUSTER_NAME + "/ASSIGNMENT_METADATA/" +
metadataType,
AccessOption.PERSISTENT);
+ if (children == null) {
+ children = Collections.EMPTY_LIST;
Review comment:
It doesn't hurt. What if we want to add something to the list in the
future? This is test, so I would like to reduce the code branch as much as
possible. The only cost is a little bit more computing. But it is a test.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]