shwstppr commented on code in PR #6840:
URL: https://github.com/apache/cloudstack/pull/6840#discussion_r1052247427


##########
services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java:
##########
@@ -1307,15 +1308,12 @@ public void onScanStart() {
 
     @Override
     public Long[] getScannablePools() {
-        List<DataCenterVO> zones = _dcDao.listEnabledZones();
-
-        Long[] dcIdList = new Long[zones.size()];
-        int i = 0;
-        for (DataCenterVO dc : zones) {
-            dcIdList[i++] = dc.getId();
+        List<DataCenterVO> zones = _dcDao.listEnabledNonEdgeZones();
+        List<Long> zoneIds = 
zones.stream().map(DataCenterVO::getId).collect(Collectors.toList());

Review Comment:
   @nvazquez since listEnabledNonEdgeZones uses `GenericDaoBase::listBy` it 
won't return null. It will always return a list and an empty list when no zones 
found.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to