|
Description
|
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.
Posted Date : 2007-08-14 00:28:44.0
|