You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/05 18:19:40 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #1215: Remove the unnecessary checks to allow cleaning up map/list fields in the ClusterConfig and InstanceConfig.

jiajunwang commented on a change in pull request #1215:
URL: https://github.com/apache/helix/pull/1215#discussion_r465916251



##########
File path: helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
##########
@@ -709,9 +709,6 @@ public void enableP2PMessage(boolean enabled) {
    * @param capacityKeys
    */
   public void setInstanceCapacityKeys(List<String> capacityKeys) {
-    if (capacityKeys == null || capacityKeys.isEmpty()) {
-      throw new IllegalArgumentException("The input instance capacity key list is empty.");
-    }

Review comment:
       Both empty the list. Null will remove the key. Empty list will set an empty list to the key. Both are fine for our logic.




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org