Bug 1034844 - [RFE] Eliminate unnecessary typecasts when using IEventListener interface
Summary: [RFE] Eliminate unnecessary typecasts when using IEventListener interface
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: bugs@ovirt.org
URL:
Whiteboard: ux
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-26 15:32 UTC by Vojtech Szocs
Modified: 2014-06-16 15:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-16 15:27:26 UTC
oVirt Team: ---


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.