Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6592441
Votes 0
Synopsis Remove 300 redundant casts
Category java:other
Reported Against
Release Fixed 7(b20)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6600143
Submit Date 14-AUG-2007
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
Work Around
N/A
Evaluation
A fine idea.
Posted Date : 2007-08-14 00:28:44.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang