@@ -0,0 +1,1007 @@
+package sfBugs;%0A%0Aimport edu.umd.cs.findbugs.annotations.NoWarning;%0A%0Apublic class Bug3237161 %7B%0A    public String methodWhichReturnsString() %7B%0A        return %22%22;%0A    %7D%0A%0A    public String methodWhichReturnsNullString() %7B%0A        return null;%0A    %7D%0A%0A    @NoWarning(%22RCN%22)%0A    public void testRedundantNullCheck() %7B%0A%0A        String nullString = methodWhichReturnsNullString();%0A        // No warning here%0A        if (nullString == null) %7B%0A            nullString = %22Null%22;%0A        %7D%0A%0A        String testString = methodWhichReturnsString();%0A        // This method can be overridden so can return null like in SubClass%0A        // but we get a warning saying that this is a redundant null check%0A        if (testString == null) %7B%0A            testString = %22Null%22;%0A        %7D%0A    %7D%0A%0A    static class SubClass extends Bug3237161 %7B%0A        @Override%0A        // In that case it always returns null so null check is a good thing%0A        public String methodWhichReturnsString() %7B%0A            return null;%0A        %7D%0A    %7D%0A%7D%0A%0A%0A

add test case