Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7.1
-
None
-
Reviewed
Description
The EventHandler class is often used in an untyped context resulting in a bunch of warnings about unchecked usage. The culprit is the Dispatcher.getHandler() method. Fixing the typing on the method to return EventHandler<Event> instead of EventHandler clears up the errors and doesn't not introduce any incompatible changes. In the case that some code does:
EventHandler h = dispatcher.getHandler();
it will still work and will issue a compiler warning about raw types. There are, however, no instances of this issue in the current source base.