DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
original report 26 July 2006 by Ruimo Uno (Shisei Hanai)
--------
Hi,
The DumbMethods detector in FIndBugs-1.0.0 reports the
DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION against the following
code:
Method m = String.class.getMethod("getBytes", new Class[] {int.class,
int.class, byte[].class, int.class});
if (m.isAnnotationPresent(Deprecated.class)) {
Since the retention policy of the @Deprecated is the RUNTIME, this is a false
positive. It seems that the DumbMethods uses a retention class database that
is set by the visitAnnotation(). As a result, FindBugs can report correctly
only
for visited annotation classes and other classes are wrongly reported as bugs.
Is this as designed?
Original issue reported on code.google.com by bassc...@gmail.com
on 28 Jul 2006 at 1:59
Google Code Exporter commented
fix checked into cvs 27 July 2006
Original comment by bassc...@gmail.com
on 28 Jul 2006 at 2:00
- Changed state: Fixed