Bug 1034844

Summary: [RFE] Eliminate unnecessary typecasts when using IEventListener interface
Product: [Retired] oVirt Reporter: Vojtech Szocs <vszocs>
Component: ovirt-engine-webadminAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WONTFIX QA Contact: bugs <bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abonas, acathrow, ecohen, iheim, mgoldboi, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ux
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-16 15:27:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vojtech Szocs 2013-11-26 15:32:45 UTC
The IEventListener interface is declared as following:

 public interface IEventListener {
     void eventRaised(Event ev, Object sender, EventArgs args);
 }

For specific events, such as PropertyChangedEvent triggered by following code within a model class:

 getPropertyChangedEvent().raise(this, e);

where "e" is PropertyChangedEventArgs, client code will have to do unnecessary typecast like this:

 ...
 public void eventRaised(Event ev, Object sender, EventArgs args) {
     PropertyChangedEventArgs actualArgs = (PropertyChangedEventArgs) args;
 }
 ...

To eliminate unnecessary typecasts as shown above, the IEventListener interface should be improved (i.e. parametrized).

Comment 1 Alissa 2013-11-27 15:45:40 UTC
in the meantime, patches to supress findbug warnings are submitted.
When this RFE is resolved, the patches can be reverted.

http://gerrit.ovirt.org/#/c/21797/

Comment 2 Alissa 2013-11-28 14:03:56 UTC
http://gerrit.ovirt.org/#/c/21838/

Comment 3 Alissa 2013-11-28 16:17:58 UTC
http://gerrit.ovirt.org/#/c/21847/

Comment 4 Alissa 2013-12-01 11:31:48 UTC
http://gerrit.ovirt.org/#/c/21882/

Comment 6 Alissa 2013-12-03 17:11:10 UTC
http://gerrit.ovirt.org/#/c/21975/

Comment 7 Alissa 2013-12-05 13:45:25 UTC
http://gerrit.ovirt.org/#/c/22089/

Comment 8 Alissa 2013-12-10 10:11:33 UTC
http://gerrit.ovirt.org/#/c/22230/

Comment 9 Itamar Heim 2014-06-16 15:27:26 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.