GabrielBrascher commented on a change in pull request #3186: Add possibility to 
set KVM MTU size for all NIC
URL: https://github.com/apache/cloudstack/pull/3186#discussion_r346622474
 
 

 ##########
 File path: 
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
 ##########
 @@ -578,7 +583,17 @@ public void doInTransactionWithoutResult(final 
TransactionStatus status) {
 
                 _networkOfferingDao.persistDefaultL2NetworkOfferings();
 
-                _kvmMtuSize = 
NumbersUtil.parseInt(_configDao.getValue(KvmMtuSize.key()), 0);
+                final List<ClusterVO> clusterVOs = 
_clusterDao.listByHypervisorAndCluster(HypervisorType.KVM, 
Cluster.ClusterType.CloudManaged);
+
+                if ((clusterVOs != null) && !clusterVOs.isEmpty()) {
 
 Review comment:
   Can you please update this if conditional to `if 
(!CollectionUtils.isEmpty(clusterVOs)) { ... }`?
   The "isEmpty" is a Null-safe check; thus, it is a great option for checking 
if a collection is empty (returning true if null or empty).

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


With regards,
Apache Git Services

Reply via email to