Steps to reproduce:
1. Expand the attached .tgz file.
2. Edit build.xml and point
findbugs-home at a FindBugs installation.
findbugs.xml with one bug reported.
The 'bug' is supposedly an unconfirmed cast on line 5 of Renderer.java. FindBugs claims that
value is an
Enum, and therefore we can't call a method from
Displayable without an implied cast.
However, the generics in the definition of the type param
T at the beginning of the class state that
T extends Enum<T> & Displayable, and therefore the
value passed into the method in question must be both an
Enum and a
Displayable -- therefore calling the method from
Displayable is safe.
By comparison, doing exactly the same thing with FindBugs 1.3.9 does not produce any bug warnings.
Java Versions: reproduced with both 1.7.0_45 and 1.6.0_65
OS: Mac OS X 10.8.5