Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

However, to implement this guideline unchecked warnings cannot not be relied upon. According to the Java Language Specification [JLS 05] section 4.12.2.1 "Heap Pollution":

Wiki Markup
Note that this does not imply that heap pollution only occurs if an unchecked warning actually occurred. It is possible to run a program where some of the binaries were compiled by a compiler for an older version of the Java programming language, or by a compiler that allows the unchecked warnings to
be suppressed (sic). This practice is unhealthy at
 suppressed _\[sic\]_. This practice is unhealthy at best.

Overriding legacy classes and generifying the overriding method is not a panacea as this is made illegal by the Java Language Specification [JLS 05]. It is best to avoid mixing generic and non-generic code.

...