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

mperina at redhat.com mperina at redhat.com
Wed Nov 25 13:26:55 UTC 2015


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

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


core: Optimize equals/hashCode in gluster 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: Ic5f7909fde498969d2c5b96d5ceb058253fa28f1
Signed-off-by: Martin Perina <mperina at redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterAsyncTask.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/BrickProfileDetails.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterBrickEntity.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterGeoRepSession.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterGeoRepSessionConfiguration.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterGeoRepSessionDetails.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterHookEntity.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServer.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServerHook.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServerInfo.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServerService.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterService.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterSnapshotConfigInfo.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeAdvancedDetails.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeEntity.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeOptionEntity.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeOptionInfo.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileInfo.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStats.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeSizeInfo.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeSnapshotConfig.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeSnapshotEntity.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeSnapshotSchedule.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/StorageDevice.java
24 files changed, 442 insertions(+), 584 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5f7909fde498969d2c5b96d5ceb058253fa28f1
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list