Change in ovirt-engine[master]: core: Optimize equals/hashCode in storage classes

mperina at redhat.com mperina at redhat.com
Wed Nov 25 07:43:43 UTC 2015


Martin Peřina has submitted this change and it was merged.

Change subject: core: Optimize equals/hashCode in storage classes
......................................................................


core: Optimize equals/hashCode in storage classes

1. Optimizes equals method to contain recommended functionality as
   described in Effective Java 2nd edition

2. Optimizes objects comparison in equals method to use Objects.equals()

3. Optimizes hashCode method to use Objects.hash()/hashCode() methods

Change-Id: I267f21b60cc99089b3cdfc9c1e27b061d11339bf
Signed-off-by: Martin Perina <mperina at redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/IscsiBond.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/StorageDomainOvfInfo.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/StoragePool.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/storage/BaseDisk.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/CinderConnectionInfo.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/CinderDisk.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/Disk.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/DiskImage.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/DiskImageDynamic.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/DiskLunMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/DiskLunMapId.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/Image.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/ImageStorageDomainMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/ImageStorageDomainMapId.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/LUNStorageServerConnectionMap.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/LUNs.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/LibvirtSecret.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/LunDisk.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/OpenStackVolumeProviderProperties.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/StorageServerConnectionExtension.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/vds_spm_id_map.java
27 files changed, 350 insertions(+), 415 deletions(-)

Approvals:
  Martin Peřina: Verified
  Jenkins CI: Passed CI tests
  Allon Mureinik: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/48847
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I267f21b60cc99089b3cdfc9c1e27b061d11339bf
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list