Allon Mureinik has uploaded a new change for review. Change subject: core: Fix VDS.hashCode() ......................................................................
core: Fix VDS.hashCode() VDS.hashCode() includes the hashCode() of vdsDynamic and vdsStatistics, which are not present in VDS.eqauls(Object). This behavior violates Java's contract that clearly states that if a.equals(b) then it is required that a.hashCode() == b.hashCode(). This patch fixes the aforementioned bug by removing these two members for the hashCode() calculation. Change-Id: Ie006b12f59762bc92663007a37bf46325f8f9378 Signed-off-by: Allon Mureinik <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/32/16432/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java index 9724c5d..ca87adf 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java @@ -41,8 +41,6 @@ final int prime = 31; int result = 1; result = prime * result + ((mVdsStatic == null) ? 0 : mVdsStatic.hashCode()); - result = prime * result + ((mVdsDynamic == null) ? 0 : mVdsDynamic.hashCode()); - result = prime * result + ((mVdsStatistics == null) ? 0 : mVdsStatistics.hashCode()); result = prime * result + ((cpuName == null) ? 0 : cpuName.hashCode()); result = prime * result + ((_spm_status == null) ? 0 : _spm_status.hashCode()); result = prime * result + cpuOverCommitDurationMinutes; -- To view, visit http://gerrit.ovirt.org/16432 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie006b12f59762bc92663007a37bf46325f8f9378 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
