1. Guava's Function interface declares apply() takes a single @Nullable parameter.
2. I implement this interface but declare the parameter @Nonnull (essentially overriding the annotation)
3. The Findbugs warning message changes from "id must be nonnull but is marked as nullable" to "x0 must be nonnull but is marked as nullable" where "id" is the parameter found in my implementation and "x0" does not exist.
I believe this is a false-positive. We should be able to override @Nullable with @Nonnull without this lingering warning.
I can't replicate this. See the attached sourcefile.
Can you supply a sourcefile that demonstrates the problem?
problem doesn't manifest itself in this file
Testcase
Please open the attached testcase in Netbeans (I used 7.3 nightly build but older versions should work too) and run Source -> Inspect -> Findbugs.
PS: The problem seems to be linked to the use of Generics. Your testcase (using raw types) doesn't trigger the bug.
Fixed. the problem had to do the interaction of bridge methods and annotations.
Hi!
Is it possible to release new maven artifacts which will include this fix?
Currently the latest ones are:
com.google.code.findbugs findbugs 2.0.1 30-Jul-2012
And it is referred by: org.codehaus.mojo findbugs-maven-plugin 2.5.2 31-Jul-2012