Liron Aravot has posted comments on this change.

Change subject: core: Support undoing diskless previews
......................................................................


Patch Set 4: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java
Line 86:         boolean hasAsyncTasks = false;
no need to init boolean to false, it's false by default by JLS.

Line 87:         if (getImagesList().size() > 0) {
I think that you should use isEmpty() here.

Line 91:                             getVmId(), targetSnapshot, 
removedSnapshotId);
I think that it's better to declare VdcReturnValueBase returnValue = null; 
outside of the method like it used to be, there's no reason to perform this 
reference definition inside the method each time and not once.

Line 92:                     VdcReturnValueBase returnValue = 
runAsyncTask(VdcActionType.RestoreFromSnapshot, params);
I think that this if should be : 
if (!returnValue.getSucceeded() && !succeded)

because if we already got a false result and have set the fault, there's no 
reason to override it again and set succeeded to false again.

--
To view, visit http://gerrit.ovirt.org/6676
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic62eee3cfb03abd21905ad6aa132c8cc10dbfb70
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to