Martin Betak has posted comments on this change.

Change subject: frontend: refactoring: Generify Events and Listeners
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/32837/5//COMMIT_MSG
Commit Message:

Line 18:     IEventListener#eventRaised method since this parameter, as opposed 
to
Line 19:     args, was rarely used and never in generic way (almost exclusively 
for object
Line 20:     equality checks) and the correct form given the above 
contravariance
Line 21:     feature would require unnecessary complication of all implementors
Line 22:     (Event<? extends T>).
> This I'm not sure I understand. If you had already gone through the trouble
Parametrisation of EventArgs is very important and very beneficial since its 
descendants were always cast and then accessed for their type-specific data. On 
the other hand, the event argument is used only for simple .equals() calls 
where it might just as well be an object. With regards to method eventRaised 
the parametrisation of the sender argument would be more benficial in my 
opinion, but that would be a much more complicated endeavour. 

You see most event listeners were already of signature eventRaised(Event event, 
Object source, EventArgs args) so adding <EventArgs> type parameter didn't 
require (in most cases) further modifications. Changing it to Event<? extends 
EventArgs> would provide no type safety benefit whatsoever and would 
considerably increase the amount of work required.
Line 23: 
Line 24: Along the way there were encountered varios small oportunities to
Line 25: generify several entity models and get rid of unnecessary casts. These
Line 26: oportunities have been siezed.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icddf5780c00c985966e6ae956a401c3ede6a68e7
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to