CP-36392: Change condition that always evaluates to false in WlbOptimizePoolAction

Also tidy up code within constructor

Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
Danilo Del Busso 2021-09-14 12:57:48 +01:00
parent 0ffee712b7
commit 3c70dacecc

View File

@ -55,13 +55,8 @@ namespace XenAdmin.Actions.Wlb
public WlbOptimizePoolAction(Pool pool, Dictionary<VM, WlbOptimizationRecommendation> vmOptLst, string optId)
: base(pool.Connection, string.Format(Messages.WLB_OPTIMIZING_POOL, Helpers.GetName(pool).Ellipsise(50)))
{
if (pool == null)
throw new ArgumentNullException("pool");
if (vmOptLst == null)
throw new ArgumentNullException("vmOptLst");
this.Pool = pool;
this.vmOptList = vmOptLst;
Pool = pool;
vmOptList = vmOptLst ?? throw new ArgumentNullException("vmOptLst");
this.optId = optId;
#region RBAC Dependencies