@@ -0,0 +1,1018 @@
+package sfBugs;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0A%0Aimport edu.umd.cs.findbugs.annotations.ExpectWarning;%0Aimport edu.umd.cs.findbugs.annotations.NoWarning;%0A%0Apublic class Bug3424971 %7B%0A%0A    @ExpectWarning(%22OS_OPEN_STREAM_EXCEPTION_PATH%22)%0A    public static void writeInFile(final File file, final byte%5B%5D content) throws FileNotFoundException, IOException %7B%0A        FileOutputStream fos = null;%0A%0A        try %7B%0A            fos = new FileOutputStream(file);%0A            fos.write(content);%0A        %7D finally %7B%0A            fos.flush();%0A            fos.close();%0A        %7D%0A    %7D%0A%0A    @NoWarning(%22OS_OPEN_STREAM_EXCEPTION_PATH%22)%0A    public static void writeInFile2(final File file, final byte%5B%5D content) throws FileNotFoundException, IOException %7B%0A        FileOutputStream fos = null;%0A%0A        try %7B%0A            fos = new FileOutputStream(file);%0A            fos.write(content);%0A        %7D finally %7B%0A            fos.close();%0A        %7D%0A    %7D%0A%0A%7D%0A

add test case