This commit is contained in:
Edison Su 2011-05-05 11:19:52 -04:00
parent b66b3f1c45
commit 592807c036

View File

@ -268,7 +268,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
sc.setParameters("dc", dcId);
List<HostVO> storageHosts = listBy(sc);
if (storageHosts == null) {
if (storageHosts == null || storageHosts.size() < 1) {
return null;
} else {
return storageHosts.get(0);