Tal Nisan has posted comments on this change. Change subject: core: introduce RemoveDiskSnapshotsCommand ......................................................................
Patch Set 6: (2 comments) http://gerrit.ovirt.org/#/c/26327/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskSnapshotsCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskSnapshotsCommand.java: Line 210: return new StorageDomainValidator(getStorageDomain()); Line 211: } Line 212: Line 213: protected boolean validateVmNotDuringSnapshot() { Line 214: return validate(createSnapshotValidator().vmNotDuringSnapshot(getVmId())); You are creating a SnapshotValidator Object a few times, I'd consider using the same one as it's a stateless Object anyway (though imo the better approach is that the validator methods to be static) Line 215: } Line 216: Line 217: protected boolean validateVmNotInPreview() { Line 218: return validate(createSnapshotValidator().vmNotInPreview(getVmId())); Line 248: return true; Line 249: } Line 250: Line 251: protected boolean validateStorageDomainActive() { Line 252: StorageDomainValidator validator = createStorageDomainValidator(); Same here (Validator creation) Line 253: if (!validate(validator.isDomainExistAndActive())) { Line 254: return false; Line 255: } Line 256: return true; -- To view, visit http://gerrit.ovirt.org/26327 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia714a4390d1d9b672005be30f58b7fa98b9a31cd Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches