shwstppr commented on a change in pull request #5231:
URL: https://github.com/apache/cloudstack/pull/5231#discussion_r674580201



##########
File path: server/src/main/java/com/cloud/server/ManagementServerImpl.java
##########
@@ -2197,7 +2197,11 @@ private void 
abstractDataStoreClustersList(List<StoragePool> storagePools, List<
             sc2.setParameters("ids", freeAddrIds.toArray());
             addrs.addAll(_publicIpAddressDao.search(sc2, searchFilter)); // 
Allocated + Free
         }
-
+        List<? extends IpAddress> wPagination = 
com.cloud.utils.StringUtils.applyPagination(addrs, cmd.getStartIndex(), 
cmd.getPageSizeVal());
+        if (wPagination != null) {
+            Pair<List<? extends IpAddress>, Integer> listWPagination = new 
Pair<List<? extends IpAddress>, Integer>(wPagination, addrs.size());
+            return listWPagination;

Review comment:
       ```suggestion
               return new Pair<>(wPagination, addrs.size());
   ```
   shorter




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