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



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




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to