Change in ovirt-engine[master]: core: simplify businessentity equals() methods [part 2]
lhornyak at redhat.com
lhornyak at redhat.com
Tue Feb 26 16:03:33 UTC 2013
Laszlo Hornyak has submitted this change and it was merged.
Change subject: core: simplify businessentity equals() methods [part 2]
......................................................................
core: simplify businessentity equals() methods [part 2]
Instead of manually doing a null-safe comparison for each business
entity, use ObjectUtils.objectsEqual(). Where applicable, optimize
the order of comparison by looking at the id field first.
The resulting code is more concise, easier to maintain, and doesn't
mask errors due to missing braces like the previous code did.
Change-Id: I8e77ebc95015105b54fbb09472e38a2d36492278
Signed-off-by: Greg Padgett <gpadgett at redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/LUN_storage_server_connection_map.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/LUNs.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/LdapGroup.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/LunDisk.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Quota.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/QuotaStorage.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/QuotaVdsGroup.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RoleGroupMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RoleGroupMapId.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Snapshot.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomain.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomainDynamic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomainStatic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StoragePoolIsoMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StoragePoolIsoMapId.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/TagsUserGroupMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/TagsUserMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/TagsVdsMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/TagsVmMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/TagsVmPoolMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdcOption.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsStatistics.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDevice.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDeviceId.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDynamic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmGuestAgentInterface.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPool.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmPoolMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatistics.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/permissions.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage_pool.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/tags.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/vds_spm_id_map.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/ObjectUtils.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/ObjectUtilsTest.java
41 files changed, 615 insertions(+), 1,746 deletions(-)
Approvals:
Laszlo Hornyak: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/12416
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8e77ebc95015105b54fbb09472e38a2d36492278
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: ofri masad <omasad at redhat.com>
More information about the Engine-commits
mailing list