
Allon Mureinik has submitted this change and it was merged. Change subject: core: Fail fast ImportVmTemplateCommand#validate() ...................................................................... core: Fail fast ImportVmTemplateCommand#validate() Cleaned up the ImportVmTemaplateCommand#validate() method to use the early-return (fail-fast) idiom in order to clean up the code and make it more readable, instead of dragging the retVal variable throughout the method. As part of this refactoring, the setActionMessageParameters() method was overridden so that validate() doesn't have to handle adding the default variables. Moreover, since it previously was NOT overridden, it inherited its implementation from its superclass, MoveOrCopyTemplateCommand, which caused an undefined behavior. Change-Id: I335ada3c12b83db2d4a904fdfc30affec4d835c9 Signed-off-by: Allon Mureinik <amureini@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java 1 file changed, 81 insertions(+), 93 deletions(-) Approvals: Tal Nisan: Looks good to me, approved Allon Mureinik: Verified; Passed CI tests -- To view, visit https://gerrit.ovirt.org/55094 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I335ada3c12b83db2d4a904fdfc30affec4d835c9 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipchuk@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>