Bug 284265 [JFace] DialogSettings.save() silently ignores IOException
Build ID: M20090211-1700 (Problem still in HEAD) STEPS TO REPRODUCE Call DialogSettings.save() on a Writer that produced a IOException or with a file which causes trouble during output (e.g. full drive). EXPECTED The original exception thrown by the underlying output should be propagated to the caller -- as "save() throws IOException" suggests. ACTUAL The IOException is silently ignored. ANALYSIS The internal DialogSettings.XMLWriter is based in a java.io.PrintWriter, which catches all IOExceptions.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
* settings.put("Array1",new String[]{"aaaa1","bbbb1","cccc1"});
 * DialogSettings section = new DialogSettings("sectionName");
 * settings.addSection(section);
 * section.put("Int2",200);
 * section.put("Float2",1.1);
 * section.put("Array2",new String[]{"aaaa2","bbbb2","cccc2"});
 * settings.save("c:\\temp\\test\\dialog.xml");
 * </code>
 * </pre>
 * @noextend This class is not intended to be subclassed by clients.
 */
public class DialogSettings implements IDialogSettings {
    
    private String name;
    /* A Map of DialogSettings representing each sections in a DialogSettings.
     It maps the DialogSettings' name to the DialogSettings */
    private Map sections;
    /* A Map with all the keys and values of this sections.
     Either the keys an values are restricted to strings. */
    private Map items;
    
    private Map arrayItems;
    private static final String TAG_SECTION = "section";
    private static final String TAG_NAME = "name";
    private static final String TAG_KEY = "key";
    private static final String TAG_VALUE = "value";
    private static final String TAG_LIST = "list";
    private static final String TAG_ITEM = "item";
    /**
     * Create an empty dialog settings which loads and saves its