abh1sar commented on code in PR #11316:
URL: https://github.com/apache/cloudstack/pull/11316#discussion_r2239520178


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java:
##########
@@ -129,6 +129,8 @@ public int compare(CapacityResponse resp1, CapacityResponse 
resp2) {
                 int res = resp1.getZoneName().compareTo(resp2.getZoneName());
                 if (res != 0) {
                     return res;
+                } else if (getSortBy() != null) {
+                    return 0;

Review Comment:
   The list is already sorted by Usage which is the only 'sortable' value, 
that's why return 0 works.
   Have tried to make the code more readable
   



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to