You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/11/10 13:15:21 UTC

[GitHub] [cloudstack] weizhouapache commented on a change in pull request #4141: [New feature] Load balancer customization (haproxy-based)

weizhouapache commented on a change in pull request #4141:
URL: https://github.com/apache/cloudstack/pull/4141#discussion_r520552327



##########
File path: core/src/main/java/com/cloud/agent/api/routing/LoadBalancerConfigCommand.java
##########
@@ -72,4 +82,35 @@ public NicTO getNic() {
     public Long getVpcId() {
         return vpcId;
     }
+
+    public LoadBalancerConfigTO[] getNetworkLbConfigs() {
+        return this.networkLbConfigs;
+    }
+
+    public void setNetworkLbConfigs(List<? extends LoadBalancerConfig> networkLbConfigs) {
+        if (networkLbConfigs == null) {
+            networkLbConfigs = new ArrayList<LoadBalancerConfig>();
+        }
+        this.networkLbConfigs = new LoadBalancerConfigTO[networkLbConfigs.size()];

Review comment:
       > when `networkLbConfigs` is null, empty array is being created here. Is that the intention here? further, GC has to cleanup the reference for `networkLbConfigs`. same would be applicable for the similar code in this PR.
   
   @sureshanaparti so your suggestion is ?




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