Change in ovirt-engine[master]: core: Fix VDS.hashCode()

amureini at redhat.com amureini at redhat.com
Thu Jul 4 17:30:06 UTC 2013


Allon Mureinik has submitted this change and it was merged.

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 <amureini at redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
1 file changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved


-- 
To view, visit http://gerrit.ovirt.org/16432
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie006b12f59762bc92663007a37bf46325f8f9378
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list