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


##########
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:
   ```suggestion
       private void closeCheckedReservations(List<CheckedReservation> 
checkedReservations) {
   ```



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