@@ -0,0 +1,1646 @@
+package sfBugsNew;%0A%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.ObjectOutput;%0Aimport java.io.ObjectOutputStream;%0Aimport java.io.Serializable;%0A%0Aimport edu.umd.cs.findbugs.annotations.DesireNoWarning;%0Aimport edu.umd.cs.findbugs.annotations.NoWarning;%0A%0Apublic class Bug1230 %7B%0A%0A    @DesireNoWarning(%22OS_OPEN_STREAM%22)%0A    public void writeObject(String file, Serializable serializable) throws FileNotFoundException, IOException %7B%0A        try (ObjectOutput output = new ObjectOutputStream(new FileOutputStream(file))) %7B%0A            output.writeObject(serializable);%0A            %7D%0A    %7D%0A    @DesireNoWarning(%22OS_OPEN_STREAM%22)%0A    public void writeObject2(String file, Serializable serializable) throws FileNotFoundException, IOException %7B%0A        try (FileOutputStream fOut = new FileOutputStream(file);%0A                ObjectOutput output = new ObjectOutputStream(fOut)) %7B%0A            output.writeObject(serializable);%0A            %7D%0A    %7D%0A    @NoWarning(%22OS_OPEN_STREAM%22)%0A    public void writeObject3(String file, Serializable serializable) throws FileNotFoundException, IOException %7B%0A        try (FileOutputStream fOut = new FileOutputStream(file);%0A                ObjectOutputStream output = new ObjectOutputStream(fOut)) %7B%0A            output.writeObject(serializable);%0A            %7D%0A    %7D%0A    @NoWarning(%22OS_OPEN_STREAM%22)%0A    public void writeObject(FileOutputStream file, Serializable serializable) throws FileNotFoundException, IOException %7B%0A        try (ObjectOutput output = new ObjectOutputStream(file)) %7B%0A            output.writeObject(serializable);%0A            %7D%0A    %7D%0A%7D%0A

Add test case for Bug 1230