Current implementation of ConfusionBetweenInheritedAndOuterMethod doesn't take into account which object the method was executed on, thus the false-positive is possible in the following case:
public class Outer { public void test() {} public static class Super { public void test() {} } public class Inner extends Super { @NoWarning("IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD") public void fp() { Inner inner = new Inner(); inner.test(); } } }
We actually encountered such false-positive in the clone method in our project. I wrote a simple fix for this case.
https://code.google.com/r/amaembo-findbugs/source/list?name=bug-1322 - only this patch (test case included)
https://code.google.com/r/amaembo-findbugs/source/list?name=master - all my patches
Thanks Tagir!