Skip to content

Commit f06a04f

Browse files
committed
Simplify ternary operator
1 parent a714b99 commit f06a04f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,7 @@ public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForc
477477

478478
_resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
479479
try {
480-
ShutdownCommand cmd = AddHostOnServiceRestart.value() ? new ShutdownCommand(ShutdownCommand.DeleteHost, null, false) :
481-
new ShutdownCommand(ShutdownCommand.DeleteHost, "Cleaning up zone/pod/cluster details for host", true);
480+
ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null, !AddHostOnServiceRestart.value());
482481
agentMgr.send(host.getId(), cmd);
483482
} catch (AgentUnavailableException e) {
484483
s_logger.warn("Sending ShutdownCommand failed: ", e);

0 commit comments

Comments
 (0)