mirror of https://github.com/apache/cloudstack.git
CID-1261671 added null check
This commit is contained in:
parent
54e5f28ace
commit
251e88c401
|
|
@ -150,6 +150,11 @@ public class DomainDaoImpl extends GenericDaoBase<DomainVO, Long> implements Dom
|
|||
if (id != null && id.longValue() == Domain.ROOT_DOMAIN) {
|
||||
s_logger.error("Can not remove domain " + id + " as it is ROOT domain");
|
||||
return false;
|
||||
} else {
|
||||
if(id == null) {
|
||||
s_logger.error("Can not remove domain without id.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
DomainVO domain = findById(id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue