Allon Mureinik has posted comments on this change.

Change subject: engine: Illegal images should be skipped when validating 
duplicates
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

Why copy the code from DiskImageValidator instead of fixing it?

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java
Line 371:         List<DiskImage> duplicateDiskImages = 
getDuplicateDiskImagesFromDB(diskImages);
Line 372: 
Line 373:         if (duplicateDiskImages.isEmpty()) {
Line 374:             return true;
Line 375:         }
This is redundant - if it's empty, the next for will just skip it.
Line 376: 
Line 377:         for (DiskImage diskImage : diskImages) {
Line 378:             if (diskImage.getImageStatus() != ImageStatus.ILLEGAL) {
Line 379:                 
existingLegalDisksAliases.add(diskImage.getDiskAlias());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7b43e4b4e8e04dfb644a33ea9ce2a474987c5e3c
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgot...@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: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
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

Reply via email to