Skip to content

Commit

Permalink
Split ternary operator into if else
Browse files Browse the repository at this point in the history
  • Loading branch information
kvargha committed Sep 27, 2024
1 parent cd67e5e commit 41d71a3
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,13 @@ public VeniceControllerClusterConfig(VeniceProperties props) {
this.adminCheckReadMethodForKafka = props.getBoolean(ADMIN_CHECK_READ_METHOD_FOR_KAFKA, true);
this.controllerClusterName = props.getString(CONTROLLER_CLUSTER, "venice-controllers");
this.controllerResourceInstanceGroupTag = props.getString(CONTROLLER_RESOURCE_INSTANCE_GROUP_TAG, "");
this.controllerInstanceTagList = props.getString(CONTROLLER_INSTANCE_TAG_LIST, "").isEmpty()
? Collections.emptyList()
: props.getList(CONTROLLER_INSTANCE_TAG_LIST, Collections.emptyList());

if (props.getString(CONTROLLER_INSTANCE_TAG_LIST, "").isEmpty()) {
this.controllerInstanceTagList = Collections.emptyList();
} else {
this.controllerInstanceTagList = props.getList(CONTROLLER_INSTANCE_TAG_LIST, Collections.emptyList());
}

this.controllerClusterReplica = props.getInt(CONTROLLER_CLUSTER_REPLICA, 3);
this.controllerClusterZkAddress = props.getString(CONTROLLER_CLUSTER_ZK_ADDRESSS, getZkAddress());
this.parent = props.getBoolean(CONTROLLER_PARENT_MODE, false);
Expand Down

0 comments on commit 41d71a3

Please sign in to comment.