[
https://issues.apache.org/jira/browse/CLOUDSTACK-8870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266348#comment-15266348
]
ASF GitHub Bot commented on CLOUDSTACK-8870:
--------------------------------------------
Github user rhtyd commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/846#discussion_r61724005
--- Diff: engine/schema/src/com/cloud/host/dao/HostDaoImpl.java ---
@@ -1087,4 +1087,11 @@ public HostVO findByPublicIp(String publicIp) {
sc.addAnd("dataCenterId", SearchCriteria.Op.EQ, zoneId);
return customSearch(sc, null);
}
+
+ @Override
+ public List<HostVO> listByType(Host.Type type) {
+ SearchCriteria<HostVO> sc = TypeSearch.create();
+ sc.setParameters("type", type);
+ return listBy(sc);
--- End diff --
the listByType consumers are not doing != null checks, we can fix it by
doing it here and returning a Collections.emptyList(); this way the methods
ensures that no null is returned
Please fix the NPE case, otherwise LGTM
> external network device usage monitor runs even when there are no external
> devices
> ----------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-8870
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8870
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Kishan Kavala
> Assignee: Kishan Kavala
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)