Arik Hadas has uploaded a new change for review. Change subject: core: fix findbugs errors ......................................................................
core: fix findbugs errors There were couple of errors related to the way we compute if post zero is needed when removing memory image from export domain. This patch changes the way we do it to be more standard. Change-Id: Ic66ba287b6048615b71cd0b2d876e7d75bcc4655 Signed-off-by: Arik Hadas <aha...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverFromExportDomain.java 1 file changed, 13 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/50/18650/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverFromExportDomain.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverFromExportDomain.java index 57195a7..d4b1599 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverFromExportDomain.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverFromExportDomain.java @@ -55,15 +55,20 @@ */ protected boolean isPostZero() { if (cachedPostZero == null) { - // check if one of the disks is marked with wipe_after_delete - cachedPostZero = - vm.getDiskMap().values().contains(new Object() { - @Override - public boolean equals(Object obj) { - return ((Disk) obj).isWipeAfterDelete(); - } - }); + cachedPostZero = isVmContainsWipeAfterDeleteDisk(); } return cachedPostZero; } + + /** + * @return true IFF one of the disks is marked with wipe_after_delete + */ + private boolean isVmContainsWipeAfterDeleteDisk() { + for (Disk disk : vm.getDiskMap().values()) { + if (disk.isWipeAfterDelete()) { + return true; + } + } + return false; + } } -- To view, visit http://gerrit.ovirt.org/18650 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic66ba287b6048615b71cd0b2d876e7d75bcc4655 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches