Github user alexandrelimassantana commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1424#discussion_r54362098
--- Diff: server/src/com/cloud/template/TemplateManagerImpl.java ---
@@ -1705,6 +1709,14 @@ public VMTemplateVO
createPrivateTemplateRecord(CreateTemplateCmd cmd, Account t
s_logger.debug("This template is getting created from
other template, setting source template Id to: " + sourceTemplateId);
}
}
+
+
+ // ignore passed zoneId if we are using region wide image store
+ List<ImageStoreVO> stores = _imgStoreDao.findRegionImageStores();
+ if (stores != null && stores.size() > 0) {
--- End diff --
Hello @syed
this if condition can be changed to use the Apache's CollectionUtils
isEmpty() method for enhanced readability
https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/CollectionUtils.html#isEmpty(java.util.Collection)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---