package sfBugs;

import java.io.Closeable;
import java.io.IOException;
import java.io.StringReader;

public class Bug2990536 {
    public void foo(Bar bar) throws IOException {

        while (true) {
            Closeable c = new StringReader("foo");
            try {
                try {
                    bar.bar(c);
                    c = null;
                } catch (InterruptedException ex) {
                    continue;
                }
            } finally {
                if (c != null) {
                    c.close();
                }
            }
        }
    }

    interface Bar {
        void bar(Closeable c) throws InterruptedException;
    }

}

@@ -98,33 +98,134 @@
 r;%0A%0A
-public class Bug2990536 %7B
+import edu.umd.cs.findbugs.annotations.NoWarning;%0A%0Apublic class Bug2990536 %7B%0A    @NoWarning(%22RCN_REDUNDANT_NULLCHECK_OF_NULL%22)
 %0A   

test case for bug