@@ -0,0 +1,895 @@
+package sfBugs;%0D%0A%0D%0Aimport edu.umd.cs.findbugs.annotations.DesireWarning;%0D%0Aimport edu.umd.cs.findbugs.annotations.ExpectWarning;%0D%0Aimport edu.umd.cs.findbugs.annotations.NonNull;%0D%0A%0D%0Apublic class Bug3061338 %7B%0D%0A%0D%0A%09@DesireWarning(%22NP_NONNULL_PARAM_VIOLATION%22)%0D%0A%09public void doesntWork() %7B%0D%0A%09%09TestClassTwo two = null;%0D%0A%09%09TestClassOne one = new TestClassOne();%0D%0A%0D%0A%09%09for (int i = 0; i %3C 5; i++) %7B%0D%0A%09%09%09// two is null and should be identified it as an invalid null input.%0D%0A%09%09%09one.getTwo(two);%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%09@ExpectWarning(%22NP_NONNULL_PARAM_VIOLATION%22)%0D%0A%09public void alreadyWorks() %7B%0D%0A%09%09TestClassTwo two = null;%0D%0A%09%09TestClassOne one = new TestClassOne();%0D%0A%0D%0A%09%09for (int i = 0; i %3C 5; i++) %7B%0D%0A%09%09%09two = null;%0D%0A%09%09%09one.getTwo(two);%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%0D%0A%09public static class TestClassOne %7B%0D%0A%0D%0A%09%09public TestClassTwo getTwo(@NonNull TestClassTwo two) %7B%0D%0A%09%09%09return two;%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09public static class TestClassTwo %7B%0D%0A%09%7D%0D%0A%7D%0D%0A

Add test case for bug 3061338