Copilot commented on code in PR #12779:
URL: https://github.com/apache/cloudstack/pull/12779#discussion_r2910550519


##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -4614,13 +4547,17 @@ private UserVm getUncheckedUserVmResource(DataCenter 
zone, String hostName, Stri
             logger.error("error during resource reservation and allocation", 
e);
             throw new CloudRuntimeException(e);
         } finally {
-            for (CheckedReservation checkedReservation : checkedReservations) {
-                try {
-                    checkedReservation.close();
-                } catch (Exception e) {
-                    logger.error("error during resource reservation and 
allocation", e);
-                    throw new CloudRuntimeException(e);
-                }
+            closeCheckeReservation(checkedReservations);
+        }
+    }
+
+    private void closeCheckeReservation(List<CheckedReservation> 
checkedReservations) {

Review Comment:
   The method `closeCheckeReservation` has a typo in its name — it should be 
`closeCheckedReservation`. This is an inconsistency that will persist in the 
codebase and may cause confusion when searching for this method later.



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