@@ -0,0 +1,511 @@
+package sfBugs;%0A%0Aimport edu.umd.cs.findbugs.annotations.NonNull;%0A%0Apublic class Bug1924512 %7B%0A    @NonNull%0A    public static String nonNullLoop(String%5B%5D args) %7B%0A        String ret = null;%0A        for (String s : args) %7B%0A            ret = s;%0A        %7D%0A        return ret; // no warning reported here%0A    %7D%0A%0A    @NonNull%0A    public static String nonNullIf(String%5B%5D args) %7B%0A        String ret = null;%0A    %09if(args.length %3E 0) %7B%0A    %09%09ret = args%5B0%5D;%0A    %09%7D%0A    %09return ret; // warning correctly reported here%0A    %7D%0A%7D%0A

Test case for [ 1924512 ] Null check fooled by zero-iteration loop