[
https://issues.apache.org/jira/browse/YARN-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Templeton updated YARN-4457:
-----------------------------------
Attachment: YARN-4457.006.patch
Here's an updated patch. *Lots* changed since the last patch, so there are a
bunch of new changes here.
I spent a little time considering the alternative, which would be to make
{{EventHandler}} not generic, and I think that approach is the greater of two
evils. With this patch, it's mostly test code where I'm actually changing
types. If I remove the generic, I'll be changes types in production code.
Let's get this in before someone else commits something else.
> Cleanup unchecked types for EventHandler
> ----------------------------------------
>
> Key: YARN-4457
> URL: https://issues.apache.org/jira/browse/YARN-4457
> Project: Hadoop YARN
> Issue Type: Improvement
> Affects Versions: 2.7.1
> Reporter: Daniel Templeton
> Assignee: Daniel Templeton
> Labels: oct16-easy
> Attachments: YARN-4457.001.patch, YARN-4457.002.patch,
> YARN-4457.003.patch, YARN-4457.004.patch, YARN-4457.005.patch,
> YARN-4457.006.patch
>
>
> 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:
> {code}
> EventHandler h = dispatcher.getHandler();
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]