Remove 300 redundant casts

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 7
    • Affects Version/s: 7
    • Component/s: other-libs
    • b20
    • generic
    • generic
    • Not verified

      javac conveniently generates warnings for "redundant casts",
      i.e. those with no effect. These warnings are particularly worthwhile fixing,
      because:

      - removing the cast should have no effect at runtime, i.e. these changes are
        generally quite safe
      - it almost always makes the code more maintainable

      Changes in the jdk have caused some formerly perfect code to no longer be so:
      - clone() of arrays now have covariant return types
      - Some classes have been generified, in particular PrivilegedAction

      Both of these have caused formerly necessary casts to become redundant.

            Assignee:
            Martin Buchholz
            Reporter:
            Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: