server: fix NPE, compare known versus unknown in equals()

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2024-05-04 17:16:49 +05:30
parent 807cd6a830
commit 607911562e
1 changed files with 1 additions and 1 deletions

View File

@ -2390,7 +2390,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
_hostDao.update(host.getId(), host);
}
if (host != null && host.getHypervisorType().equals(HypervisorType.XenServer) &&
if (host != null && HypervisorType.XenServer.equals(host.getHypervisorType()) &&
startup instanceof StartupRoutingCommand) {
final StartupRoutingCommand ssCmd = (StartupRoutingCommand)startup;
updateSupportsClonedVolumes(host, ssCmd.getSupportsClonedVolumes());