Yaniv Bronhaim has posted comments on this change.
Change subject: core: Remove call to super CDA
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddEmptyStoragePoolCommand.java
Line 66
Line 67
Line 68
Line 69
Line 70
if someone will add logic to the father's CDA, he should also be responsible to
call it from the sons (all the sons if its relevant to them). Adding super call
without actual reason can also cause bugs if the father's logic is specific to
the father's instance and not to its sons.. Vered, don't you think ?
Line 73: @Override
Line 74: protected boolean canDoAction() {
Line 75: boolean result = true;
Line 76: StoragePoolValidator storagePoolValidator = new
StoragePoolValidator(getStoragePool());
Line 77: if (result &&
DbFacade.getInstance().getStoragePoolDao().getByName(getStoragePool().getname())
!= null) {
if you omit the super call, you don't need to check the result here.. its true
anyway
Line 78: result = false;
Line 79:
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NAME_ALREADY_EXIST);
Line 80: } else if (!CheckStoragePoolNameLengthValid()) {
Line 81: result = false;
--
To view, visit http://gerrit.ovirt.org/15088
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I33046daed409f8a0d7ad1680191ba7824087402a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches