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 2021/02/23 14:39:14 UTC

[GitHub] [cloudstack] GabrielBrascher commented on a change in pull request #4714: Cleaning up code and enhancing a few IP management logs

GabrielBrascher commented on a change in pull request #4714:
URL: https://github.com/apache/cloudstack/pull/4714#discussion_r581090419



##########
File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
##########
@@ -824,11 +824,11 @@ public IPAddressVO doInTransaction(TransactionStatus status) throws Insufficient
                     if (vlanDbIds == null || vlanDbIds.contains(nonDedicatedVlan.getId()))
                         nonDedicatedVlanDbIds.add(nonDedicatedVlan.getId());
                 }
-                if (dedicatedVlanDbIds != null && !dedicatedVlanDbIds.isEmpty()) {
+                if (!dedicatedVlanDbIds.isEmpty()) {
                     fetchFromDedicatedRange = true;
                     sc.setParameters("vlanId", dedicatedVlanDbIds.toArray());
                     errorMessage.append(", vlanId id=" + Arrays.toString(dedicatedVlanDbIds.toArray()));
-                } else if (nonDedicatedVlanDbIds != null && !nonDedicatedVlanDbIds.isEmpty()) {

Review comment:
       Null check not needed, the list has been created at line 793.
   
   `List<Long> nonDedicatedVlanDbIds = new ArrayList<Long>();`




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