Doron Fediuck has posted comments on this change.

Change subject: WIP core: fix businessentity hashCode/equals errors
......................................................................


Patch Set 3: (1 inline comment)

Something which bugs me... see inline.

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/QuotaStorage.java
Line 139:         int result = 1;
Line 140:         result = prime * result + ((quotaId == null) ? 0 : 
quotaId.hashCode());
Line 141:         result = prime * result + ((quotaStorageId == null) ? 0 : 
quotaStorageId.hashCode());
Line 142:         result = prime * result + ((storageId == null) ? 0 : 
storageId.hashCode());
Line 143:         result = prime * result + ((storageLimitGigaByteUsage == 
null) ? 0 : storageLimitGigaByteUsage.hashCode());
Greg, are you sure we want usage in the hash?
Please correct me if I'm wrong, but usage may be changed externally, (new disk) 
and cached instances will now have a different hash which will not match the 
new one.

Am I wrong?
Line 144:         result = prime * result + ((storageLimitGigaByte == null) ? 0 
: storageLimitGigaByte.hashCode());
Line 145:         return result;
Line 146:     }
Line 147: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic83c16ab9bbbb95f45bfcd91920f8137890e63d8
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Noam Slomianko <nslom...@redhat.com>
Gerrit-Reviewer: ofri masad <oma...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to