Allon Mureinik has posted comments on this change.

Change subject: engine: Changed Event.equal signature to override Object.equal
......................................................................


Patch Set 1: I would prefer that you didn't submit this

This patch will cause some very strange behavior.
Consider the following:

1. Two equals definitions:
Event e = new Event("Bla", String.class);
EventDefinition ed = new EventDefinition("Bla", String.class);

e.equals(ed) -> returns true.
e.equals((Object)ed) -> returns false.

2. Equals and hashCode:
Event e1 = new Event("Bla", String.class);
Event e2 = new Event("Bla", String.class);

e1.equals(e2) -> returns true
e1.hashCode() == e2.hashCode() -> doesn't necessarily return true.


I'd do the following:
1. Rename Event.equals(EventDefinition) to something less "internal" to java, 
like Event.matchesDefinition(EventDefinition).
2. Add a hashCode() method.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idca42d6a61454162db412429e55898f15152c12d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to