Doron Fediuck has posted comments on this change.

Change subject: core: cleanup RemoveStoragePoolCommand
......................................................................


Patch Set 4: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStoragePoolCommand.java
Line 311:             }
Line 312:             final List<storage_domains> poolDomains = 
DbFacade.getInstance().getStorageDomainDAO().getAllForStoragePool(
Line 313:                     getStoragePool().getId());
Line 314:             if (returnValue) {
Line 315:                 final List<storage_domains> domainsList = 
getActiveOrLockedDomainList(poolDomains);
Laszlo, your fix assumes that getActiveOrLockedDomainList does not return null
because of how filter was implemented.

Will this always be the case?
ie- in order to improve, I'd check if the list is null or empty. So if 
something changes the code is robust to handle it.
Line 316: 
Line 317:                 if (!domainsList.isEmpty()) {
Line 318:                     returnValue = false;
Line 319:                     
addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I687c84b2e62873c70691071d4b59819086aa42b8
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to