Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-4457

Cleanup unchecked types for EventHandler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.1
    • 3.0.0-alpha2
    • None

    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.

      Attachments

        1. YARN-4457.001.patch
          28 kB
          Daniel Templeton
        2. YARN-4457.002.patch
          28 kB
          Daniel Templeton
        3. YARN-4457.003.patch
          1 kB
          Daniel Templeton
        4. YARN-4457.004.patch
          28 kB
          Daniel Templeton
        5. YARN-4457.005.patch
          32 kB
          Daniel Templeton
        6. YARN-4457.006.patch
          53 kB
          Daniel Templeton

        Issue Links

          Activity

            People

              templedf Daniel Templeton
              templedf Daniel Templeton
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: