Laszlo Hornyak has posted comments on this change.
Change subject: core: RunVmCommand.canDoAction cleanup (1)
......................................................................
Patch Set 4: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
Line 679: getRunVmValidator().validateVmProperties(vm,
messages) &&
Line 680: canRunVm(vm) &&
Line 681: validateNetworkInterfaces();
Line 682: if (!canDoAction) {
Line 683: return false;
once you add an early return here, could you turn the rest of the method to be
like that?
Line 684: }
Line 685:
Line 686: // check for Vm Payload
Line 687: if (canDoAction && getParameters().getVmPayload() !=
null) {
Line 683: return false;
Line 684: }
Line 685:
Line 686: // check for Vm Payload
Line 687: if (canDoAction && getParameters().getVmPayload() !=
null) {
canDoAction can only be trrue here, so that could be removed from the expression
Line 688: canDoAction =
checkPayload(getParameters().getVmPayload(),
Line 689: getParameters().getDiskPath());
Line 690:
Line 691: if (canDoAction &&
!StringUtils.isEmpty(getParameters().getFloppyPath()) &&
--
To view, visit http://gerrit.ovirt.org/13397
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I60bbdb54d150878123968893c23169de253e1ba2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches